<template>
    <div class="page_root" :key="queryUpdateFlag" data-page-name="会议纪要" data-page-identification="s_d3rfobzmwq">
        <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
            <!-- begin vid_hyun7rbd2w 自定义模板_bngazh2iex -->
            <!--            查看原文本-->
            <a-modal
                :visible="diffState.orginVisible"
                title="原文本"
                :footer="null"
                centered
                @cancel="diffState.orginVisible = false"
            >
                <div v-html="diffState.orginText"></div>
            </a-modal>
            <!--            查看原文本-->
            <!--            对比-->
            <a-modal
                :visible="diffState.diffVisible"
                title="对比"
                centered
                width="1200px"
                :mask-closable="false"
                :footer="null"
                @cancel="diffState.diffVisible = false"
                destroy-on-close
                :body-style="{
                    paddingTop: '16px'
                }"
            >
                <div class="mg16">
                    <div class="mg8 diff-title">会议主题</div>
                    <!--                主题-->
                    <DiffContent :oldData="diffState.oldMeetingName" :newData="diffState.newMeetingName" />
                    <!--                主题-->
                </div>
                <div>
                    <div class="mg8 diff-title"> 会议总结</div>
                    <!--                总结-->
                    <DiffContent :oldData="diffState.oldSummary" :newData="diffState.newSummary" />
                    <!--                总结-->
                </div>
            </a-modal>
            <!--            对比-->
            <!--            转任务-->
            <a-modal
                :visible="taskState.otherTaskVisible"
                :title="taskState.otherTaskTitle"
                centered
                width="1000px"
                @ok="confirmOtherMb"
                :ok-button-props="{ loading: taskState.otherOkLoading }"
                @cancel="cancelOtherMb"
                destroy-on-close
            >
                <div class="mbtask-form">
                    <a-form :model="taskState.otherTaskForm" ref="ptOtherRef">
                        <div v-for="(item, index) in taskState.otherTaskForm.taskList" :key="index" class="form-item">
                            <a-row>
                                <a-col :span="24">
                                    <a-form-item
                                        label="产品线"
                                        :name="['taskList', index, 'projectId']"
                                        :rules="{ required: true, message: '请选择产品线!' }"
                                    >
                                        <a-tree-select
                                            v-model:value="taskState.otherTaskForm.taskList[index].projectId"
                                            show-search
                                            style="width: 100%"
                                            placeholder="请选择"
                                            allow-clear
                                            treeDefaultExpandAll
                                            :tree-data="taskState.projectTree"
                                            :fieldNames="{
                                                children: 'children',
                                                label: 'projectName',
                                                value: 'projectId',
                                                key: 'projectId'
                                            }"
                                            @change="getPopleList"
                                            treeNodeFilterProp="projectName"
                                        />
                                    </a-form-item>
                                </a-col>
                                <a-col :span="24">
                                    <a-form-item
                                        label="任务名称"
                                        :name="['taskList', index, 'taskName']"
                                        :rules="[
                                            {
                                                required: true,
                                                message: '请输入任务名称!'
                                            },
                                            {
                                                validator: () => {
                                                    if (taskState.otherTaskForm.taskList[index].taskName) {
                                                        if (taskState.otherTaskForm.taskList[index].taskName.trim()) {
                                                            return PromiseProxy.resolve()
                                                        } else {
                                                            return PromiseProxy.reject('请输入任务名称!')
                                                        }
                                                    } else {
                                                        return PromiseProxy.resolve()
                                                    }
                                                }
                                            }
                                        ]"
                                    >
                                        <a-input
                                            :placeholder="inputHolder"
                                            v-model:value="taskState.otherTaskForm.taskList[index].taskName"
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row>
                                <a-col :span="12">
                                    <a-form-item
                                        label="所属用户故事"
                                        :name="['taskList', index, 'storyId']"
                                        :rules="{ required: true, message: '请选择所属用户故事!' }"
                                    >
                                        <a-select
                                            :placeholder="selectHolder"
                                            v-model:value="taskState.otherTaskForm.taskList[index].storyId"
                                            showSearch
                                            :options="taskState.storyList"
                                            :field-names="{ label: 'label', value: 'value' }"
                                            :filter-option="
                                                (input, option) => {
                                                    return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }
                                            "
                                            @change=""
                                            @focus="getStory"
                                        />
                                    </a-form-item>
                                </a-col>
                                <a-col :span="12">
                                    <a-form-item label="所属SOP任务">
                                        <!--                                        :name="['taskList', index, 'parentId']" :rules="{ required: true, message:-->
                                        <!--                                        '请选择父级任务!' }"-->
                                        <a-tree-select
                                            placeholder="请选择所属SOP任务"
                                            v-model:value="taskState.otherTaskForm.taskList[index].parentId"
                                            allowClear
                                            showSearch
                                            :tree-data="taskState.otherTaskForm.taskList[index].sopTaskList"
                                            :field-names="{ label: 'taskName', value: 'taskId' }"
                                            :filter-option="
                                                (input, option) => {
                                                    return (
                                                        option.taskName.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    )
                                                }
                                            "
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-col :span="24">
                                <a-form-item
                                    label="优先级"
                                    :name="['taskList', index, 'priorityDigit']"
                                    :rules="[{ required: true, validator: validatePriority, trigger: 'blur' }]"
                                >
                                    <a-input-number
                                        style="width: 100%"
                                        placeholder="请输入 1 到 99 之间，最多一位小数的正数"
                                        v-model:value="taskState.otherTaskForm.taskList[index].priorityDigit"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-row>
                                <a-col :span="12">
                                    <a-form-item
                                        label="预计投入工时"
                                        :name="['taskList', index, 'workingHours']"
                                        :rules="[
                                            { required: true, message: '请输入预计投入工时!', trigger: 'blur' },
                                            {
                                                pattern: /^(0\.5|[1-9](\d*)?(\.5)?(\.0)?)$/,
                                                message: '请输入大于0的数字(支持0.5的倍数)',
                                                trigger: 'blur'
                                            }
                                        ]"
                                    >
                                        <a-input
                                            placeholder="请输入工时(支持0.5的数字)"
                                            v-model:value="taskState.otherTaskForm.taskList[index].workingHours"
                                            :min="0"
                                            type="number"
                                            suffix="小时"
                                        />
                                    </a-form-item>
                                </a-col>
                                <a-col :span="12">
                                    <a-form-item
                                        label="任务起止时间"
                                        :name="['taskList', index, 'allTime']"
                                        :rules="{ required: true, message: '请选择任务起止时间!' }"
                                    >
                                        <a-range-picker
                                            style="width: 100%"
                                            v-model:value="taskState.otherTaskForm.taskList[index].allTime"
                                            valueFormat="YYYY-MM-DD"
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row>
                                <a-col :span="12">
                                    <a-form-item
                                        label="任务负责人"
                                        :name="['taskList', index, 'taskOwner']"
                                        :rules="{ required: true, message: '请选择任务负责人!' }"
                                    >
                                        <a-select
                                            :placeholder="selectHolder"
                                            v-model:value="taskState.otherTaskForm.taskList[index].taskOwner"
                                            showSearch
                                            :options="lhwtState.allUser"
                                            :field-names="{ label: 'name', value: 'name' }"
                                            :filter-option="
                                                (input, option) => {
                                                    return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }
                                            "
                                        />
                                    </a-form-item>
                                </a-col>
                                <a-col :span="12">
                                    <a-form-item
                                        label="审核员"
                                        :name="['taskList', index, 'assessorName']"
                                        :rules="{ required: false, message: '请选择审核员!' }"
                                    >
                                        <a-select
                                            :placeholder="selectHolder"
                                            v-model:value="taskState.otherTaskForm.taskList[index].assessorName"
                                            showSearch
                                            :options="lhwtState.allUser"
                                            :field-names="{ label: 'name', value: 'name' }"
                                            :filter-option="
                                                (input, option) => {
                                                    return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }
                                            "
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row>
                                <a-col :span="24">
                                    <a-form-item
                                        label="任务执行人"
                                        :name="['taskList', index, 'taskParticipantList']"
                                        :rules="{ required: true, message: '请选择任务参与人!' }"
                                    >
                                        <a-select
                                            :placeholder="selectHolder"
                                            v-model:value="taskState.otherTaskForm.taskList[index].taskParticipantList"
                                            showSearch
                                            mode="multiple"
                                            :options="lhwtState.allUser"
                                            :field-names="{ label: 'name', value: 'value' }"
                                            :filter-option="
                                                (input, option) => {
                                                    return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }
                                            "
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row>
                                <a-col v-if="taskPeopleList.length > 0" :span="22">
                                    <div style="width: 700px; margin-left: 115px; margin-bottom: 28px">
                                        <a
                                            href="javascript:;"
                                            v-for="(item, num) in taskPeopleList"
                                            @click="handlerAddOtherPeople(item.value, index)"
                                            ><span style="margin: 0 5px">{{ item.value }}</span></a
                                        >
                                    </div>
                                </a-col>
                            </a-row>
                            <a-row>
                                <a-col :span="24">
                                    <a-form-item label="备注">
                                        <a-textarea
                                            placeholder="请输入备注"
                                            v-model:value="taskState.otherTaskForm.taskList[index].description"
                                        />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                        </div>
                        <!--                        <a-col :span="22">-->
                        <!--                            <a-button @click="handleAddOtherItem" type="primary" ghost> 新增</a-button>-->
                        <!--                        </a-col>-->
                    </a-form>
                </div>
            </a-modal>
            <!--            转任务-->
            <!--            问题维护-->
            <a-modal
                :visible="secondState.editVisible"
                centered
                :mask-closable="false"
                width="1000px"
                title="问题维护"
                @cancel="cancelCheck"
                @ok="handleConfirmCheck"
                :ok-button-props="{ loading: secondState.checkLoading }"
            >
                <a-form-item style="margin-bottom: 16px; width: 40%" label="记录日期">
                    <a-range-picker
                        value-format="YYYY-MM-DD"
                        v-model:value="secondState.dateTime"
                        @change="getSelectTable"
                    />
                </a-form-item>
                <div class="kb-table-box">
                    <a-table
                        :columns="actionColumns"
                        :dataSource="secondState.tableData"
                        :scroll="{ y: 550 }"
                        :pagination="false"
                        bordered
                        @resizeColumn="handleResizeColumn"
                        :showSorterTooltip="false"
                        ref="tableRef"
                        row-key="id"
                        :row-selection="{
                            selectedRowKeys: secondState.checkList,
                            onChange: selectChange,
                            fixed: true
                        }"
                    />
                </div>
            </a-modal>
            <!--            问题维护-->
            <!--          看视频-->
            <a-modal
                :visible="pxState.videoVisble"
                width="885px"
                centered
                title="视频文件"
                @cancel="closeVideo"
                destroy-on-close
                :footer="null"
            >
                <div class="video-container">
                    <video
                        id="video01"
                        :src="pxState.videoSrc"
                        playsinline
                        webkit-playsinline
                        preload="auto"
                        autoplay
                        width="840"
                        height="360"
                    ></video>
                    <!--                    <div class="watermark"></div>-->
                </div>
            </a-modal>
            <!--          看视频-->
            <!--          必填校验-->
            <a-modal
                v-model:visible="lhwtState.validateVisible"
                @ok="noSaveData"
                @cancel="lhwtState.validateVisible = false"
                title="请确认"
                centered
                :ok-button-props="{ loading: lhwtState.tipLoading }"
            >
                <p>
                    新增数据必填/必选项未补全，完成后将不保存相关数据；取消则继续维持编辑模板，确定则不保存不完整的数据；
                </p>
            </a-modal>
            <!--          必填校验-->
            <!--          转化为faq-->
            <a-modal
                centered
                :visible="faqState.createVisible"
                title="转化为FAQ"
                width="800px"
                @ok="confirmQuestion"
                @cancel="cancalQuestion"
                :body-style="{ padding: '16px', height: '600px', overflowY: 'auto' }"
                :ok-button-props="{ loading: faqState.pzLoading }"
                destroy-on-close
                :maskClosable="false"
            >
                <div class="faq-my-page">
                    <a-form :model="faqState.createList" ref="questionRef">
                        <a-row>
                            <a-col :span="24">
                                <a-form-item label="选择问题">
                                    <a-select
                                        v-model:value="faqState.createList.questionId"
                                        :field-names="{ label: 'label', value: 'value' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        :options="faqState.questionList"
                                        @change="questionChange"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="24">
                                <a-form-item
                                    label="问题名称"
                                    :rules="[{ required: true, message: '请输入问题名称', trigger: 'blur' }]"
                                    name="problemName"
                                >
                                    <a-input
                                        :disabled="faqState.createList.questionId"
                                        v-model:value="faqState.createList.problemName"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="24">
                                <a-form-item
                                    label="项目阶段"
                                    :rules="[{ required: true, message: '请输入项目阶段', trigger: 'blur' }]"
                                    name="stageNames"
                                >
                                    <a-textarea v-model:value="faqState.createList.stageNames" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="24">
                                <a-form-item
                                    label="标签"
                                    :rules="[{ required: true, message: '请输入标签', trigger: 'blur' }]"
                                    name="labels"
                                >
                                    <a-textarea v-model:value="faqState.createList.labels" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="24">
                                <a-form-item
                                    label="回答"
                                    :rules="[{ required: true, message: '请输入回答', trigger: 'blur' }]"
                                    name="answerStr"
                                >
                                    <QuillEditor
                                        v-model:content="faqState.createList.answerStr"
                                        ref="answerQuillEditor"
                                        :options="editorOption"
                                        class="quill-editor"
                                    />
                                </a-form-item>
                            </a-col>
                        </a-row>
                    </a-form>
                </div>
            </a-modal>
            <!--          转化为faq-->
            <!--          转换为工单-->
            <a-modal
                centered
                v-model:visible="gdState.visible"
                title="转化为工单"
                @ok="submit"
                @cancel="fatherCancel"
                width="1000px"
                destroy-on-close
                :ok-button-props="{ loading: gdState.fatherLoading }"
            >
                <div class="gd-form-content">
                    <a-form :model="gdState.modalForm" ref="gdFormRef">
                        <a-row>
                            <a-col :span="24">
                                <a-form-item
                                    label="工单标题"
                                    :rules="[{ required: true, message: '请输入工单标题', trigger: 'blur' }]"
                                    name="content"
                                >
                                    <a-textarea
                                        maxlength="100"
                                        show-count
                                        placeholder="请输入"
                                        v-model:value="gdState.modalForm.content"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="工单类型"
                                    :rules="[{ required: true, message: '请选择工单类型', trigger: 'blur' }]"
                                    name="type"
                                >
                                    <a-select
                                        :options="[
                                            {
                                                label: '问题转化',
                                                value: '问题转化'
                                            },
                                            {
                                                label: '产品问题',
                                                value: '产品问题'
                                            },
                                            {
                                                label: '数据问题',
                                                value: '数据问题'
                                            },
                                            {
                                                label: '算法问题',
                                                value: '算法问题'
                                            },
                                            {
                                                label: '系统故障',
                                                value: '系统故障'
                                            },
                                            {
                                                label: '产品需求',
                                                value: '产品需求'
                                            },
                                            {
                                                label: '算法需求',
                                                value: '算法需求'
                                            }
                                        ]"
                                        v-model:value="gdState.modalForm.type"
                                        placeholder="请选择"
                                        @change="gdState.modalForm.monitorScene = undefined"
                                    />
                                    <!--                                  @change="hanldeTypeChange"-->
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item label="监控场景">
                                    <a-select
                                        @focus="getMonitorSceneList(false)"
                                        show-search
                                        :options="gdState.monitorSceneList"
                                        v-model:value="gdState.modalForm.monitorScene"
                                        placeholder="请选择"
                                        :field-names="{ label: 'label', value: 'value' }"
                                        :filterOption="
                                            (input, option) => {
                                                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="优先级"
                                    :rules="[{ required: true, message: '请选择优先级', trigger: 'blur' }]"
                                    name="priority"
                                >
                                    <a-select
                                        :disabled="gdState.modalForm.type === '产品需求'"
                                        v-model:value="gdState.modalForm.priority"
                                        :options="[
                                            {
                                                label: 'p0',
                                                value: 'p0'
                                            },
                                            {
                                                label: 'p1',
                                                value: 'p1'
                                            },
                                            {
                                                label: 'p2',
                                                value: 'p2'
                                            },
                                            {
                                                label: 'p3',
                                                value: 'p3'
                                            }
                                        ]"
                                        placeholder="请选择"
                                    />
                                    <!--                                  @change="getSolveTimeByType"-->
                                </a-form-item>
                            </a-col>
                            <a-col :span="12" v-if="gdState.modalForm.type !== '产品需求'">
                                <a-form-item
                                    label="计划解决时长(小时)"
                                    :rules="[
                                        {
                                            pattern: new RegExp(/^(0(\.5)?|[1-9](\d*)?(\.5)?(\.0)?)$/),
                                            message: '请输入大于0的数字(支持0.5的倍数)',
                                            trigger: 'blur'
                                        }
                                    ]"
                                    name="workHours"
                                >
                                    <a-input-number
                                        placeholder="请输入"
                                        v-model:value="gdState.modalForm.workHours"
                                        @change="getSolveTime"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="计划解决时间"
                                    :rules="[{ required: true, message: '请选择计划解决时间', trigger: 'blur' }]"
                                    name="endTime"
                                >
                                    <a-date-picker
                                        show-time
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.endTime"
                                        value-format="YYYY-MM-DD HH:mm:ss"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="问题来源"
                                    :rules="[{ required: true, message: '请选择问题来源', trigger: 'blur' }]"
                                    name="questionSource"
                                >
                                    <a-select
                                        disabled
                                        v-model:value="gdState.modalForm.questionSource"
                                        placeholder="请选择"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="所属区域"
                                    :rules="[{ required: true, message: '请选择所属区域', trigger: 'blur' }]"
                                    name="areaCode"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        :options="gdState.areaList"
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.areaCode"
                                        @focus="getAreaList"
                                        :field-names="{ label: 'label', value: 'value' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        @change="gdAreaChange"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="所属客户"
                                    :rules="[{ required: false, message: '请输入所属客户', trigger: 'blur' }]"
                                    name="customer"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        :options="gdState.customList"
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.customer"
                                        @focus="getCustomerList"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        @change="customerChange"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="所属项目"
                                    :rules="[{ required: true, message: '请选择所属项目', trigger: 'blur' }]"
                                    name="projectId"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        :options="gdState.projectList"
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.projectId"
                                        :field-names="{ label: 'projectName', value: 'projectId' }"
                                        :filter-option="
                                            (input, option) => {
                                                return (
                                                    option.projectName.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                )
                                            }
                                        "
                                        @focus="getProjectList"
                                        @change="projectChange"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="环境"
                                    :rules="[{ required: false, message: '请选择环境', trigger: 'blur' }]"
                                    name="environment"
                                >
                                    <a-select
                                        show-search
                                        allow-clear
                                        :options="gdState.environmentList"
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.environment"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        @focus="getEnvironmentList"
                                        @change="environmentChange"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item
                                    label="所属产品"
                                    :rules="[{ required: false, message: '请选择所属产品', trigger: 'blur' }]"
                                    name="production"
                                >
                                    <a-select
                                        show-search
                                        allow-clear
                                        :options="gdState.productList"
                                        placeholder="请选择"
                                        v-model:value="gdState.modalForm.production"
                                        @change="productChange"
                                        @focus="getProductList"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item label="版本">
                                    <a-input v-model:value="gdState.modalForm.version" disabled />
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <div class="description-tip" v-if="currentData.status !== '未开始' && currentData.status"
                            ><ExclamationCircleFilled class="tip-img" /> 解决中的工单不支持编辑问题描述</div
                        >
                        <a-row
                            :style="{
                                pointerEvents:
                                    currentData.status === '未开始' ||
                                    !currentData.status ||
                                    currentData.status === '待分发'
                                        ? 'auto'
                                        : 'none'
                            }"
                        >
                            <a-col :span="24">
                                <a-form-item
                                    label="问题&风险描述"
                                    :rules="[{ required: true, message: '请输入问题&风险描述', trigger: 'blur' }]"
                                    name="qillData"
                                >
                                    <QuillEditor
                                        v-model:content="gdState.modalForm.qillData"
                                        ref="quillEditor"
                                        :options="editorOption"
                                        class="quill-editor"
                                    />
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <a-row>
                            <a-col :span="24">
                                <a-form-item
                                    label="解决人"
                                    :rules="[{ required: false, message: '请选择解决人', trigger: 'blur' }]"
                                    name="solverList"
                                >
                                    <a-select
                                        class="remove-icon"
                                        show-search
                                        mode="multiple"
                                        :options="gdState.allUser"
                                        v-model:value="gdState.modalForm.solverList"
                                        placeholder="请选择"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filter-option="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        @change="fatherSolverChange"
                                    />
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <!--                      <a-col v-if="taskPeopleList.length > 0">-->
                        <a-col>
                            <div style="width: 700px; margin-left: 135px; margin-bottom: 16px">
                                <a
                                    href="javascript:;"
                                    v-for="(item, num) in taskPeopleList"
                                    @click="handlerAddPeople(item.value, index)"
                                    ><span style="margin: 0 5px">{{ item.value }}</span></a
                                >
                            </div>
                        </a-col>
                        <a-col :span="24">
                            <a-form-item label="上传附件">
                                <a-upload
                                    v-model:file-list="gdState.modalForm.descriptionAttachmentList"
                                    :multiple="true"
                                    :before-upload="handlerFatherUpload"
                                    @remove="handlerFatherRemove"
                                    accept=".xlsx, image/*,.docx,, .xls,.mp4"
                                >
                                    <a-button type="primary">
                                        <upload-outlined />
                                        上传
                                    </a-button>
                                </a-upload>
                                <span>支持格式：.xlsx, image/*,.docx,, .xls,.mp4</span>
                            </a-form-item>
                        </a-col>
                    </a-form>
                </div>
            </a-modal>
            <!--          转换为工单-->
            <!--          导入-->
            <a-modal
                v-model:visible="mettingState.importVisible"
                title="导入"
                @ok="handleImport"
                centered
                @cancel="inportCancel"
                :ok-button-props="{ loading: mettingState.importLoading }"
            >
                <a-upload
                    v-model:file-list="mettingState.inportFileList"
                    :multiple="true"
                    :before-upload="handlerUploadData"
                    @remove="handlerRemoveData"
                >
                    <a-button type="primary"> <upload-outlined />导入</a-button>
                </a-upload>
            </a-modal>
            <!--          导入-->
            <!--          新建编辑会议记录-->
            <a-drawer
                :title="mettingState.modalTitle"
                placement="bottom"
                height="936px"
                :mask-closable="false"
                :visible="mettingState.modalVisible"
                @close="cancelMeet"
            >
                <div class="modal-div">
                    <a-form :model="mettingState.modalForm" ref="formRef">
                        <a-row :gutter="0">
                            <a-col :span="22">
                                <a-form-item
                                    label="会议日期"
                                    :rules="[{ required: true, message: '请选择会议日期', trigger: 'blur' }]"
                                    name="meetingDate"
                                >
                                    <a-date-picker
                                        :allow-clear="false"
                                        placeholder="请选择"
                                        v-model:value="mettingState.modalForm.meetingDate"
                                        value-format="YYYY-MM-DD"
                                        style="width: 100%"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item
                                    label="会议主题"
                                    :rules="[{ required: true, message: '请输入会议主题', trigger: 'blur' }]"
                                    name="meetingName"
                                >
                                    <a-input
                                        v-model:value="mettingState.modalForm.meetingName"
                                        :maxlength="100"
                                        show-count
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item
                                    label="会议总结"
                                    :rules="[{ required: false, message: '请输入会议总结', trigger: 'blur' }]"
                                    name="summary"
                                >
                                    <a-textarea v-model:value="mettingState.modalForm.summary" :rows="8" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="2" style="display: flex; justify-content: start" v-if="!currentData.id">
                                <a-button type="primary" @click="handleTemporarilyStore">暂存会议总结</a-button>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item
                                    label="参会人"
                                    :rules="[{ required: false, message: '请选择参会人', trigger: 'blur' }]"
                                    name="participantList"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        mode="multiple"
                                        v-model:value="mettingState.modalForm.participantList"
                                        :options="lhwtState.allUser"
                                        placeholder="请选择"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filterOption="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        :max-tag-count="20"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item label="外部参会人">
                                    <a-input v-model:value="mettingState.modalForm.outParticipants" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item
                                    label="记录人"
                                    :rules="[{ required: false, message: '请选择记录人', trigger: 'blur' }]"
                                    name="recorder"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        v-model:value="mettingState.modalForm.recorder"
                                        :options="lhwtState.allUser"
                                        placeholder="请选择"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filterOption="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        :max-tag-count="2"
                                    />
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item label="标签">
                                    <a-checkable-tag
                                        v-for="(item, index) in lhwtState.labelsList"
                                        v-model:checked="item.checked"
                                        >{{ item.name }}</a-checkable-tag
                                    >
                                </a-form-item>
                            </a-col>
                            <a-col :span="22">
                                <a-form-item label="会议附件">
                                    <a-upload
                                        v-model:file-list="mettingState.modalForm.enclosureDtoList"
                                        :multiple="true"
                                        :before-upload="handlerUpload"
                                        @remove="handlerRemove"
                                        accept=".xlsx, image/*,.docx,, .xls,.mp4"
                                    >
                                        <a-button type="primary">
                                            <upload-outlined />
                                            上传
                                        </a-button>
                                    </a-upload>
                                </a-form-item>
                            </a-col>
                            <template v-for="(item, index) in mettingState.modalForm.videoLinks" :key="index">
                                <a-col :span="20">
                                    <a-form-item label="视频链接">
                                        <a-input
                                            v-model:value="mettingState.modalForm.videoLinks[index].link"
                                            placeholder="请输入"
                                        />
                                    </a-form-item>
                                </a-col>
                                <a-col :span="2" style="padding: 0">
                                    <a-space :size="8">
                                        <div class="del" @click="handleDeleteLink(index)"></div>
                                        <div class="add-btn" @click="handlerAddLink(index)"></div>
                                    </a-space>
                                </a-col>
                            </template>
                            <template v-if="!currentData.id">
                                <a-col :span="24">
                                    <div class="action-title">
                                        <div>问题行动项列表</div>
                                        <a-button
                                            type="primary"
                                            v-permission="'3000000996_vid_5ho9jwfmmj'"
                                            ghost
                                            size="small"
                                            @click="handleAddModalAction(mettingState.modalForm)"
                                            >新建行动项</a-button
                                        >
                                    </div>
                                </a-col>
                                <div class="kb-table-box">
                                    <a-table
                                        :columns="columnState.modalColumns"
                                        :dataSource="mettingState.modalForm.actionList"
                                        :scroll="{ y: 550 }"
                                        :pagination="false"
                                        bordered
                                        @resizeColumn="handleResizeColumn"
                                        :showSorterTooltip="false"
                                        ref="tableRef"
                                    >
                                        <template #bodyCell="{ record, text, column, index }">
                                            <template v-if="column.dataIndex == 'opration'">
                                                <a-space>
                                                    <a-popconfirm
                                                        title="确定删除吗?"
                                                        @confirm="confirmDeleteLhwtModal(record, record.id, index)"
                                                    >
                                                        <a-button size="small" type="link">删除</a-button>
                                                    </a-popconfirm>
                                                </a-space>
                                            </template>
                                            <!-- 编辑状态下，展示输入框或选择框 -->
                                            <template v-if="record.isEdit">
                                                <!--                                问题&风险描述-->
                                                <template v-if="column.dataIndex === 'questionDescription'">
                                                    <!--                                                    <div class="validate-content">-->
                                                    <a-textarea
                                                        v-model:value="record.questionDescription"
                                                        placeholder="请输入问题描述"
                                                        :rows="1"
                                                    />
                                                    <!--                                                        <div class="validate-icon"></div>-->
                                                    <!--                                                    </div>-->
                                                </template>
                                                <!--                                问题&风险描述-->
                                                <!--                                解决方案及行动项-->
                                                <template v-if="column.dataIndex === 'solutionOrAction'">
                                                    <a-textarea
                                                        v-model:value="record.solutionOrAction"
                                                        :rows="1"
                                                        placeholder="请输入解决方案/行动项"
                                                    />
                                                </template>
                                                <!--                                解决方案及行动项-->
                                                <!--                                计划解决日期-->
                                                <template v-if="column.dataIndex === 'endTime'">
                                                    <a-date-picker
                                                        :valueFormat="'YYYY-MM-DD'"
                                                        style="width: 100%"
                                                        v-model:value="record.endTime"
                                                        placeholder="选择日期"
                                                    />
                                                </template>
                                                <!--                                计划解决日期-->
                                                <!--                              责任人  -->
                                                <template v-if="column.dataIndex === 'responsiblePerson'">
                                                    <a-select
                                                        allow-clear
                                                        show-search
                                                        mode="multiple"
                                                        :max-tag-count="1"
                                                        style="width: 100%"
                                                        v-model:value="record.responsiblePersonList"
                                                        :options="lhwtState.allUser"
                                                        placeholder="请选择"
                                                        :field-names="{ label: 'name', value: 'name' }"
                                                        :filterOption="
                                                            (input, option) => {
                                                                return (
                                                                    option.name
                                                                        .toLowerCase()
                                                                        .indexOf(input.toLowerCase()) >= 0
                                                                )
                                                            }
                                                        "
                                                        :getPopupContainer="getPopupContainer"
                                                    />
                                                </template>
                                                <!--                              责任人  -->
                                            </template>
                                            <!-- 非编辑状态下，展示原始文本 -->
                                            <template v-else>
                                                <template v-if="['工厂名称'].includes(column.title)">
                                                    <div class="db-click-name" :title="text">{{ text }}</div>
                                                </template>
                                                <template
                                                    v-if="
                                                        ['区域', '日期', '项目总监', '项目经理'].includes(column.title)
                                                    "
                                                >
                                                    <div class="db-click">{{ text }}</div>
                                                </template>
                                                <template v-if="column.dataIndex === 'solutionOrAction'">
                                                    <div class="progress-click">
                                                        <a-tooltip
                                                            :overlay-style="overStyle"
                                                            v-if="record.solutionOrAction"
                                                            placement="right"
                                                        >
                                                            <template #title>
                                                                <p
                                                                    v-for="(item, index) in handlerGetSpace(
                                                                        record.solutionOrAction
                                                                    )"
                                                                    :key="index"
                                                                    style="margin: 0"
                                                                    >{{ item }}</p
                                                                > </template
                                                            ><div class="omit-div">{{ text }} </div>
                                                        </a-tooltip>
                                                    </div>
                                                </template>
                                                <template v-if="column.dataIndex === 'questionDescription'">
                                                    <div class="question-div">
                                                        <a-tooltip
                                                            :overlay-style="overStyle"
                                                            v-if="record.questionDescription"
                                                            placement="right"
                                                        >
                                                            <template #title>
                                                                <p
                                                                    v-for="(item, index) in handlerGetSpace(
                                                                        record.questionDescription
                                                                    )"
                                                                    :key="index"
                                                                    style="margin: 0"
                                                                    >{{ item }}</p
                                                                > </template
                                                            ><div class="omit-div-question"
                                                                ><span v-if="record.questionDescription">{{
                                                                    text
                                                                }}</span></div
                                                            >
                                                        </a-tooltip>
                                                    </div>
                                                </template>
                                                <template v-if="column.dataIndex === 'projectProgressStatus'">
                                                    <div class="question-div">
                                                        <a-tooltip
                                                            :overlay-style="overStyle"
                                                            v-if="record.projectProgressStatus"
                                                            placement="right"
                                                        >
                                                            <template #title>
                                                                <p
                                                                    v-for="(item, index) in handlerGetSpace(
                                                                        record.projectProgressStatus
                                                                    )"
                                                                    :key="index"
                                                                    style="margin: 0"
                                                                    >{{ item }}</p
                                                                > </template
                                                            ><div class="omit-div-status"
                                                                ><span v-if="record.projectProgressStatus">{{
                                                                    text
                                                                }}</span></div
                                                            >
                                                        </a-tooltip>
                                                    </div>
                                                </template>
                                                <template v-if="column.dataIndex === 'workOrderNumber'">
                                                    <a-tooltip :overlay-style="overStyle">
                                                        <template #title>
                                                            <p
                                                                v-for="(item, index) in handlerGetSpace(
                                                                    record.workOrderNumber
                                                                )"
                                                                :key="index"
                                                                style="margin: 0"
                                                                >{{ item }}</p
                                                            >
                                                        </template>
                                                        <div
                                                            style="
                                                                overflow: hidden;
                                                                text-overflow: ellipsis;
                                                                white-space: nowrap;
                                                            "
                                                            ><a href="#" @click="jumpGd(record)">{{ text }}</a></div
                                                        >
                                                    </a-tooltip>
                                                </template>
                                                <template v-if="column.dataIndex === 'completionStatusFeedback'">
                                                    <div class="productionPlan-div">
                                                        <a-tooltip
                                                            :overlay-style="overStyle"
                                                            v-if="record.completionStatusFeedback"
                                                            placement="right"
                                                        >
                                                            <template #title>
                                                                <p
                                                                    v-for="(item, index) in handlerGetSpace(text)"
                                                                    :key="index"
                                                                    style="margin: 0"
                                                                    >{{ item }}</p
                                                                > </template
                                                            ><div class="omit-div-productionPlan" v-if="text">{{
                                                                text
                                                            }}</div>
                                                        </a-tooltip>
                                                    </div>
                                                </template>
                                            </template>
                                        </template>
                                    </a-table>
                                </div>
                            </template>
                        </a-row>
                    </a-form>
                    <div class="btn-div">
                        <a-space>
                            <a-button type="primary" ghost @click="cancelMeet">取消</a-button>
                            <a-button type="primary" :loading="mettingState.okLoading" @click="confirmMeet"
                                >确定</a-button
                            >
                        </a-space>
                    </div>
                </div>
            </a-drawer>

            <!--          新建编辑会议记录-->
            <!--            会议纪要通知-->
            <a-modal
                :visible="remindState.modalVisible"
                title="会议纪要通知"
                centered
                :mask-closable="false"
                @ok="confirmRemind"
                @cancel="cancelRemind"
                :ok-button-props="{ loading: remindState.okLoading }"
            >
                <div class="remind-modal">
                    <a-form :model="remindState.form" ref="remindRef">
                        <a-row>
                            <a-col :span="24">
                                <a-form-item label="参会人/记录人">
                                    <a-checkbox v-model:checked="remindState.form.participant" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="24">
                                <a-form-item
                                    label="人员"
                                    :rules="[{ required: false, message: '请选择人员', trigger: 'blur' }]"
                                    name="userList"
                                >
                                    <a-select
                                        allow-clear
                                        show-search
                                        mode="multiple"
                                        v-model:value="remindState.form.userList"
                                        :options="lhwtState.allUser"
                                        placeholder="请选择"
                                        :field-names="{ label: 'name', value: 'name' }"
                                        :filterOption="
                                            (input, option) => {
                                                return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                            }
                                        "
                                        :max-tag-count="5"
                                    />
                                </a-form-item>
                            </a-col>
                        </a-row>
                    </a-form>
                </div>
            </a-modal>
            <!--            会议纪要通知-->
            <div class="body">
                <div class="top-search">
                    <a-row>
                        <a-col :span="5">
                            <a-form-item label="会议日期" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
                                <a-date-picker
                                    v-model:value="mettingState.filter.meetingDate"
                                    value-format="YYYY-MM-DD"
                                    @change="getMeetData"
                                />
                            </a-form-item>
                        </a-col>
                        <a-col :span="5">
                            <a-form-item label="关键字" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
                                <a-input
                                    v-model:value="mettingState.filter.keywords"
                                    @change="handleDebouncedSearch"
                                    placeholder="请输入"
                                />
                            </a-form-item>
                        </a-col>
                        <a-col :span="5">
                            <a-form-item label="参会人" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
                                <a-select
                                    allow-clear
                                    show-search
                                    mode="multiple"
                                    v-model:value="mettingState.filter.participantList"
                                    :options="lhwtState.allUser"
                                    placeholder="请选择"
                                    :field-names="{ label: 'name', value: 'name' }"
                                    :filterOption="
                                        (input, option) => {
                                            return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        }
                                    "
                                    :max-tag-count="2"
                                    @change="getMeetData"
                                />
                            </a-form-item>
                        </a-col>
                        <a-col :span="5">
                            <a-form-item label="记录人" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
                                <a-select
                                    allow-clear
                                    show-search
                                    v-model:value="mettingState.filter.recorder"
                                    :options="lhwtState.allUser"
                                    placeholder="请选择"
                                    :field-names="{ label: 'name', value: 'name' }"
                                    :filterOption="
                                        (input, option) => {
                                            return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        }
                                    "
                                    :max-tag-count="2"
                                    @change="getMeetData"
                                />
                            </a-form-item>
                        </a-col>
                        <a-col :span="4" style="display: flex; justify-content: end; align-items: start">
                            <a-button @click="resetMeetData" type="primary" ghost> 重置</a-button>
                        </a-col>
                    </a-row>
                </div>
                <a-spin :spinning="mettingState.dataLoading" tip="加载中">
                    <div class="summary-boy">
                        <div class="sop-title">
                            <div class="sop-title-left"> 会议纪要列表 </div>
                            <a-space>
                                <!--                                <a-button type="primary" @click="handleAdd">新建</a-button>-->
                                <a-button
                                    type="primary"
                                    v-permission="'3000000996_vid_riyrv0kc4n'"
                                    class="btn-bc"
                                    :href="mettingState.templateUrl"
                                    >模板下载</a-button
                                >
                                <a-button
                                    type="primary"
                                    v-permission="'3000000996_vid_lf32o6v3gk'"
                                    class="btn-bc"
                                    @click="mettingState.importVisible = true"
                                >
                                    导入</a-button
                                >

                                <a-button
                                    type="primary"
                                    class="btn-bc"
                                    @click="handleExport"
                                    v-permission="'3000000996_vid_trlverpwd1'"
                                    :loading="mettingState.exportLoading"
                                    >导出</a-button
                                >
                                <a-button
                                    type="primary"
                                    class="import-btn radius4"
                                    @click="handleAdd"
                                    v-permission="'3000000996_vid_upn5bjg49p'"
                                    style="display: flex; align-items: center"
                                >
                                    新建</a-button
                                >
                                <a-radio-group
                                    v-model:value="viewType"
                                    button-style="solid"
                                    @change="handleSaveViewSetting"
                                >
                                    <a-radio-button value="卡片展示">卡片展示</a-radio-button>
                                    <a-radio-button value="表格展示">表格展示</a-radio-button>
                                </a-radio-group>
                            </a-space>
                        </div>
                        <div class="scroll-div" v-if="viewType === '卡片展示'">
                            <div class="meet-item" v-for="(item, index) in mettingState.dataSource">
                                <div class="item-title" @click="toggleCollapse(item)">
                                    <div class="title-left">
                                        <div
                                            class="add-way-mannal"
                                            v-if="item.generationMethod === 'MANNAL'"
                                            @click.stop=""
                                        >
                                            <div class="add-text-mannal">手动</div>
                                        </div>
                                        <div
                                            class="add-way-llm"
                                            v-if="item.generationMethod === 'LLM'"
                                            @click.stop="showOrginText(item)"
                                        >
                                            <div class="add-text-llm">晓妙</div>
                                        </div>
                                        <div class="time-icon"></div>
                                        <span class="title">会议时间：</span>
                                        <span class="msg">{{ item.meetingDate }}</span>
                                        <div class="people-icon"></div>
                                        <span class="title">记录人：</span>
                                        <span class="msg">{{ item.recorder }}</span>
                                        <div class="jz-icon"></div>
                                        <span class="title">行动项完成进展：</span>
                                        <span class="msg">{{ item.progress }}</span>
                                    </div>
                                    <a-space :size="16" @click.stop>
                                        <div class="btn-content">
                                            <a-button
                                                type="link"
                                                size="small"
                                                v-permission="'3000000996_vid_qmwcgj4dke'"
                                                ghost
                                                @click="showDiff(item)"
                                                class="btn-father"
                                                >版本对比</a-button
                                            >

                                            <div class="son-line"></div>
                                        </div>
                                        <div class="btn-content">
                                            <a-button
                                                type="link"
                                                size="small"
                                                v-permission="'3000000996_vid_fyss2i6xxj'"
                                                ghost
                                                @click="showRemind(item)"
                                                class="btn-father"
                                                >移动端提醒</a-button
                                            >
                                            <div class="son-line"></div>
                                        </div>
                                        <div class="btn-content">
                                            <a-button
                                                type="link"
                                                size="small"
                                                v-permission="'3000000996_vid_bbdtdrw6tv'"
                                                ghost
                                                @click="getAction(item)"
                                                class="btn-father"
                                                >问题维护</a-button
                                            >
                                            <div class="son-line"></div>
                                        </div>

                                        <div class="btn-content">
                                            <a-button
                                                v-permission="'3000000996_vid_43asht8k4q'"
                                                type="link"
                                                size="small"
                                                ghost
                                                @click="handleEditMeet(item)"
                                                class="btn-father"
                                                >编辑</a-button
                                            >
                                            <div class="son-line"></div>
                                        </div>
                                        <a-popconfirm
                                            title="确定删除吗"
                                            ok-text="确定"
                                            cancel-text="取消"
                                            @confirm="handleDeleteMeet(item.id, index)"
                                            @cancel="cancel"
                                        >
                                            <div class="btn-content">
                                                <a-button
                                                    type="link"
                                                    v-permission="'3000000996_vid_km7ujixq9g'"
                                                    size="small"
                                                    ghost
                                                    class="btn-father"
                                                    >删除</a-button
                                                >
                                                <div class="son-line"></div>
                                            </div>
                                        </a-popconfirm>

                                        <div @click="toggleCollapse(item)" class="toggle-div">
                                            <span style="color: #3875ff; cursor: pointer">{{
                                                item.expand ? '收起' : '展开'
                                            }}</span>
                                            <DoubleLeftOutlined v-if="item.expand" class="active-icon" />
                                            <DoubleRightOutlined v-else class="active-icon" />
                                        </div>
                                    </a-space>
                                </div>
                                <div class="item-content">
                                    <div class="content-row">
                                        <div class="title">会议主题：</div>
                                        <div class="box">
                                            <div v-for="(item, index) in handlerGetSpace(item.meetingName)">
                                                {{ item }}
                                            </div>
                                        </div>
                                    </div>
                                    <transition name="slide-fade">
                                        <div v-if="item.expand">
                                            <div class="content-row" v-if="item.labelList && item.labelList.length > 0">
                                                <div class="title"></div>
                                                <div
                                                    class="item-icon"
                                                    v-if="item.labelList && item.labelList.length > 0"
                                                >
                                                    <!-- stageNameList 标签，使用 colorList[1] -->
                                                    <div v-for="(tag, index) in item.labelList" class="label-item">
                                                        <div class="label-img"></div>{{ tag }}
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="content-row">
                                                <div class="title">会议总结：</div>
                                                <div class="box"> {{ item.summary }}</div>
                                            </div>
                                            <!--                                        <div class="content-row" style="align-items: start">-->
                                            <!--                                            <div class="title">参会人：</div>-->
                                            <!--                                            <div class="box no-border"> {{ item.participants }}</div>-->
                                            <!--                                            <div class="title">外部参会人：</div>-->
                                            <!--                                            <div class="box no-border"> {{ item.outParticipants }}</div>-->
                                            <!--                                        </div>-->
                                            <div class="row-new">
                                                <div class="col-item">
                                                    <div class="title">参会人：</div>
                                                    <div class="box">{{ item.participants }}</div>
                                                </div>
                                                <div class="col-item">
                                                    <div class="title">外部参会人：</div>
                                                    <div class="box">{{ item.outParticipants }}</div>
                                                </div>
                                            </div>
                                            <div class="row-new">
                                                <div class="col-item">
                                                    <div class="title">会议附件：</div>
                                                    <div class="box">
                                                        <div v-for="(item, index) in item.enclosureDtoList">
                                                            <a :href="item.url" target="_blank"> {{ item.name }}</a>
                                                        </div></div
                                                    >
                                                </div>
                                                <div class="col-item">
                                                    <div class="title">视频链接：</div>
                                                    <div class="box">
                                                        <div v-for="(item, index) in item.videoLinks">
                                                            <a @click="showVideo(item)"> {{ item }}</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="table-title"
                                                >问题行动项
                                                <a-space>
                                                    <a-button
                                                        type="primary"
                                                        size="small"
                                                        ghost
                                                        @click="showTableCheck(item, index)"
                                                        >{{ item.showCheckbox ? '确定' : '取消展示' }}</a-button
                                                    >
                                                    <a-button
                                                        type="primary"
                                                        size="small"
                                                        ghost
                                                        @click="handleAddAction(item, index)"
                                                        v-permission="'3000000996_vid_5ho9jwfmmj'"
                                                        >新建行动项</a-button
                                                    >
                                                </a-space>
                                            </div>
                                            <div class="kb-table-box">
                                                <a-table
                                                    :columns="columnState.baseColumns.filter(col => col.visible)"
                                                    :dataSource="item.meetingQuestionList"
                                                    :scroll="{ y: 550 }"
                                                    :pagination="false"
                                                    bordered
                                                    @resizeColumn="handleResizeColumn"
                                                    :showSorterTooltip="false"
                                                    ref="tableRef"
                                                    :rowKey="'id'"
                                                    :rowSelection="
                                                        item.showCheckbox
                                                            ? {
                                                                  selectedRowKeys: item.selectedRowKeys,
                                                                  onChange: selectedKeys =>
                                                                      onSelectChange(selectedKeys, item)
                                                              }
                                                            : null
                                                    "
                                                >
                                                    <template #headerCell="{ column, title }">
                                                        <template v-if="title === 'PMO'">
                                                            <div style="text-align: center; position: relative">
                                                                PMO
                                                                <div
                                                                    class="togle-div"
                                                                    @click.stop="toggleColumns"
                                                                    style="
                                                                        cursor: pointer;
                                                                        display: flex;
                                                                        justify-content: center;
                                                                        align-items: center;
                                                                    "
                                                                >
                                                                    <template v-if="showAllColumns">
                                                                        <LeftCircleOutlined />
                                                                    </template>
                                                                    <template v-else>
                                                                        <RightCircleOutlined />
                                                                    </template>
                                                                </div>
                                                            </div>
                                                        </template>
                                                    </template>

                                                    <template #bodyCell="{ record, text, column, index }">
                                                        <template v-if="column.dataIndex == 'opration'">
                                                            <a-space>
                                                                <a-button
                                                                    size="small"
                                                                    type="link"
                                                                    v-permission="'3000000996_vid_6gha3fezlj'"
                                                                    @click="handleAddSonTask(record, item.id)"
                                                                    :disabled="
                                                                        record.projectType === '交付项目' ||
                                                                        !record.projectType ||
                                                                        !record.id ||
                                                                        record.taskId
                                                                    "
                                                                    >转任务</a-button
                                                                >
                                                                <a-button
                                                                    size="small"
                                                                    type="link"
                                                                    @click="showGd(record, item)"
                                                                    v-permission="'3000000996_vid_bdlemmsh07'"
                                                                    :disabled="
                                                                        record.projectType === '平台项目' ||
                                                                        record.workOrderNumber ||
                                                                        !record.id
                                                                    "
                                                                    >转工单</a-button
                                                                >
                                                                <a-button
                                                                    size="small"
                                                                    v-permission="'3000000996_vid_76z92gon83'"
                                                                    type="link"
                                                                    @click="showFaq(item, record)"
                                                                    :disabled="
                                                                        record.projectType === '平台项目' || !record.id
                                                                    "
                                                                    >转FAQ</a-button
                                                                >
                                                                <a-button
                                                                    size="small"
                                                                    type="link"
                                                                    v-permission="'3000000996_vid_cpkar9dpsp'"
                                                                    v-if="record.isEdit"
                                                                    @click="confirmLhwt(record, item.id, item)"
                                                                    :loading="record.okBtnLoading"
                                                                    >完成</a-button
                                                                >
                                                                <a-button
                                                                    size="small"
                                                                    type="link"
                                                                    v-permission="'3000000996_vid_cpkar9dpsp'"
                                                                    :loading="record.editLoading"
                                                                    v-else
                                                                    :disabled="!record.id"
                                                                    @click="handleEdit(record)"
                                                                    >编辑</a-button
                                                                >

                                                                <a-popconfirm
                                                                    title="确定删除吗?"
                                                                    @confirm="
                                                                        confirmDeleteLhwt(
                                                                            record,
                                                                            record.id,
                                                                            index,
                                                                            item.id
                                                                        )
                                                                    "
                                                                >
                                                                    <a-button
                                                                        v-permission="'3000000996_vid_p41eskpi4q'"
                                                                        size="small"
                                                                        type="link"
                                                                        >删除</a-button
                                                                    >
                                                                </a-popconfirm>
                                                            </a-space>
                                                        </template>
                                                        <!-- 编辑状态下，展示输入框或选择框 -->
                                                        <template v-if="record.isEdit">
                                                            <!--                                记录日期-->
                                                            <template v-if="column.dataIndex === 'meetingDate'">
                                                                <!--                                                            <div class="validate-content">-->
                                                                <a-date-picker
                                                                    :valueFormat="'YYYY-MM-DD'"
                                                                    style="width: 100%; padding-left: 12px"
                                                                    v-model:value="record.meetingDate"
                                                                    placeholder="选择日期"
                                                                />
                                                                <!--                                                                <div class="validate-icon"></div>-->
                                                                <!--                                                            </div>-->
                                                            </template>
                                                            <!--                                记录日期-->
                                                            <!--                                风险类型-->
                                                            <template v-if="column.dataIndex === 'riskType'">
                                                                <!--                                        <div class="validate-content">-->
                                                                <a-select
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.riskType"
                                                                    :options="lhwtState.fxlxList"
                                                                    placeholder="请选择"
                                                                    :field-names="{
                                                                        label: 'itemName',
                                                                        value: 'itemName'
                                                                    }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.itemName
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                />
                                                            </template>
                                                            <!--                                风险类型-->
                                                            <!--                                区域-->
                                                            <template v-if="column.dataIndex === 'areaName'">
                                                                <a-select
                                                                    v-if="record.projectType === '交付项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.areaCode"
                                                                    :options="lhwtState.areaNameList"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'label', value: 'value' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.label
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    @change="areaChange(record)"
                                                                />
                                                                <!--                                                                <div class="validate-icon"></div>-->
                                                                <!--                                                            </div>-->
                                                                <a-select
                                                                    v-if="record.projectType === '平台项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    disabled
                                                                    style="width: 100%"
                                                                    v-model:value="record.areaCode"
                                                                    :options="lhwtState.areaNameList"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'label', value: 'value' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.label
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    @change="areaChange(record)"
                                                                />
                                                            </template>
                                                            <!--                                区域-->
                                                            <!--                                会议类型-->
                                                            <template v-if="column.dataIndex === 'meetingSources'">
                                                                <a-select
                                                                    style="width: 100%"
                                                                    allow-clear
                                                                    mode="multiple"
                                                                    show-search
                                                                    v-model:value="record.meetingSourceList"
                                                                    :options="lhwtState.hylyList"
                                                                    placeholder="请选择"
                                                                    :field-names="{
                                                                        label: 'itemName',
                                                                        value: 'itemName'
                                                                    }"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                                会议类型-->
                                                            <!--                                产品线-->
                                                            <template v-if="column.dataIndex === 'productLine'">
                                                                <a-select
                                                                    style="width: 100%"
                                                                    allow-clear
                                                                    mode="multiple"
                                                                    show-search
                                                                    v-model:value="record.productLineList"
                                                                    :options="lhwtState.productLineList"
                                                                    placeholder="请选择"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                                产品线-->
                                                            <!--                                工厂/项目名称-->
                                                            <template v-if="column.dataIndex === 'projectShortName'">
                                                                <a-select
                                                                    v-if="record.projectType === '交付项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.projectId"
                                                                    :options="lhwtState.projectList"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'label', value: 'value' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.label
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    @change="factoryChange(record)"
                                                                    @focus="getFactory(record)"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                                <a-select
                                                                    v-if="record.projectType === '平台项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.projectId"
                                                                    :options="lhwtState.projectNameList"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'label', value: 'value' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.label
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    @focus="getProjectNameList(record)"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                                <!--                                            <div class="validate-icon"></div>-->
                                                                <!--                                                            </div>-->
                                                            </template>
                                                            <!--                                 工厂/项目名称-->
                                                            <!--                                项目总监-->
                                                            <template v-if="column.dataIndex === 'projectDirector'">
                                                                <a-select
                                                                    :disabled="record.projectType === '平台项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.projectDirector"
                                                                    :options="lhwtState.allUser"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'name', value: 'name' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.name
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :max-tag-count="2"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                                项目总监-->
                                                            <!--                                项目经理-->
                                                            <template v-if="column.dataIndex === 'pmName'">
                                                                <a-select
                                                                    :disabled="record.projectType === '平台项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.pmName"
                                                                    :options="lhwtState.allUser"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'name', value: 'name' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.name
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :max-tag-count="2"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                                项目经理-->
                                                            <!--                                问题&风险描述-->
                                                            <template v-if="column.dataIndex === 'questionDescription'">
                                                                <!--                                                            <div class="validate-content">-->
                                                                <a-textarea
                                                                    v-model:value="record.questionDescription"
                                                                    placeholder="请输入问题描述"
                                                                    :rows="1"
                                                                />
                                                                <!--                                                                <div class="validate-icon"></div>-->
                                                                <!--                                                            </div>-->
                                                            </template>
                                                            <!--                                问题&风险描述-->
                                                            <!--                                pmo-->
                                                            <template v-if="column.dataIndex === 'pmo'">
                                                                <a-select
                                                                    :disabled="record.projectType === '平台项目'"
                                                                    allow-clear
                                                                    show-search
                                                                    style="width: 100%"
                                                                    v-model:value="record.pmo"
                                                                    :options="lhwtState.allUser"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'name', value: 'name' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.name
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :max-tag-count="2"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                                pmo-->
                                                            <!--                                项目进展状态-->
                                                            <template
                                                                v-if="column.dataIndex === 'projectProgressStatus'"
                                                            >
                                                                <a-textarea
                                                                    v-model:value="record.projectProgressStatus"
                                                                    placeholder="请输入项目进展状态"
                                                                    :rows="1"
                                                                />
                                                            </template>
                                                            <!--                                项目进展状态-->
                                                            <!--                                解决方案及行动项-->
                                                            <template v-if="column.dataIndex === 'solutionOrAction'">
                                                                <a-textarea
                                                                    v-model:value="record.solutionOrAction"
                                                                    :rows="1"
                                                                    placeholder="请输入解决方案/行动项"
                                                                />
                                                            </template>
                                                            <!--                                解决方案及行动项-->
                                                            <!--                                计划解决日期-->
                                                            <template v-if="column.dataIndex === 'endTime'">
                                                                <a-date-picker
                                                                    :valueFormat="'YYYY-MM-DD'"
                                                                    style="width: 100%"
                                                                    v-model:value="record.endTime"
                                                                    placeholder="选择日期"
                                                                />
                                                            </template>
                                                            <!--                                计划解决日期-->
                                                            <!--                              完成情况反馈  -->
                                                            <template
                                                                v-if="column.dataIndex === 'completionStatusFeedback'"
                                                            >
                                                                <a-textarea
                                                                    v-model:value="record.completionStatusFeedback"
                                                                    :rows="1"
                                                                    placeholder="请输入完成情况说明"
                                                                />
                                                            </template>
                                                            <!--                              完成情况反馈  -->
                                                            <!--                              责任人  -->
                                                            <template v-if="column.dataIndex === 'responsiblePerson'">
                                                                <a-select
                                                                    allow-clear
                                                                    show-search
                                                                    mode="multiple"
                                                                    :max-tag-count="1"
                                                                    style="width: 100%"
                                                                    v-model:value="record.responsiblePersonList"
                                                                    :options="lhwtState.allUser"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'name', value: 'name' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.name
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                              责任人  -->
                                                            <!--                              问题类型  -->
                                                            <template v-if="column.dataIndex === 'questionTypeFirst'">
                                                                <a-tree-select
                                                                    v-model:value="record.questionTypeSecond"
                                                                    show-search
                                                                    treeDefaultExpandAll
                                                                    style="width: 100%"
                                                                    placeholder="请选择"
                                                                    allow-clear
                                                                    :tree-data="lhwtState.wtlxList"
                                                                    :fieldNames="{
                                                                        children: 'children',
                                                                        label: 'itemName',
                                                                        value: 'itemName',
                                                                        key: 'itemCode'
                                                                    }"
                                                                    :filterTreeNode="
                                                                        (inputValue, treeNode) => {
                                                                            return (
                                                                                treeNode.itemName
                                                                                    .toLowerCase()
                                                                                    .indexOf(
                                                                                        inputValue.toLowerCase()
                                                                                    ) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :max-tag-count="1"
                                                                />
                                                            </template>
                                                            <!--                              问题类型  -->
                                                            <!--                              项目类型  -->
                                                            <template v-if="column.dataIndex === 'projectType'">
                                                                <!--                                                            <div class="validate-content">-->
                                                                <a-select
                                                                    allow-clear
                                                                    style="width: 100%"
                                                                    show-search
                                                                    v-model:value="record.projectType"
                                                                    :options="[
                                                                        {
                                                                            label: '交付项目',
                                                                            value: '交付项目'
                                                                        },
                                                                        {
                                                                            label: '平台项目',
                                                                            value: '平台项目'
                                                                        }
                                                                    ]"
                                                                    placeholder="请选择"
                                                                    :field-names="{ label: 'label', value: 'value' }"
                                                                    :filterOption="
                                                                        (input, option) => {
                                                                            return (
                                                                                option.label
                                                                                    .toLowerCase()
                                                                                    .indexOf(input.toLowerCase()) >= 0
                                                                            )
                                                                        }
                                                                    "
                                                                    :max-tag-count="2"
                                                                    :getPopupContainer="getPopupContainer"
                                                                    @change="projectTypeChange(record)"
                                                                />
                                                                <!--                                                                <div class="validate-icon"></div>-->
                                                                <!--                                                            </div>-->
                                                            </template>
                                                            <!--                              项目类型  -->
                                                            <!--                              是否为共性问题  -->
                                                            <template v-if="column.dataIndex === 'commonProblems'">
                                                                <a-select
                                                                    allow-clear
                                                                    style="width: 100%"
                                                                    placeholder="请选择"
                                                                    :options="[
                                                                        {
                                                                            label: '是',
                                                                            value: '是'
                                                                        },
                                                                        {
                                                                            label: '否',
                                                                            value: '否'
                                                                        }
                                                                    ]"
                                                                    v-model:value="record.commonProblems"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                              是否为共性问题  -->
                                                            <!--                              体系闭环  -->
                                                            <template v-if="column.dataIndex === 'systemClosedLoop'">
                                                                <a-select
                                                                    show-search
                                                                    style="width: 100%"
                                                                    allow-clear
                                                                    placeholder="请选择"
                                                                    :options="lhwtState.txbhList"
                                                                    v-model:value="record.systemClosedLoop"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                              体系闭环  -->
                                                            <!--                              解决方案  -->
                                                            <template v-if="column.dataIndex === 'solution'">
                                                                <a-select
                                                                    style="width: 100%"
                                                                    allow-clear
                                                                    show-search
                                                                    placeholder="请选择"
                                                                    :options="lhwtState.jjfaList"
                                                                    v-model:value="record.solution"
                                                                    :getPopupContainer="getPopupContainer"
                                                                />
                                                            </template>
                                                            <!--                              解决方案  -->
                                                        </template>
                                                        <!-- 非编辑状态下，展示原始文本 -->
                                                        <template v-else>
                                                            <template v-if="['工厂名称'].includes(column.title)">
                                                                <div class="db-click-name" :title="text">{{
                                                                    text
                                                                }}</div>
                                                            </template>
                                                            <template
                                                                v-if="
                                                                    ['区域', '日期', '项目总监', '项目经理'].includes(
                                                                        column.title
                                                                    )
                                                                "
                                                            >
                                                                <div class="db-click">{{ text }}</div>
                                                            </template>
                                                            <template v-if="column.dataIndex === 'solutionOrAction'">
                                                                <div class="progress-click">
                                                                    <a-tooltip
                                                                        :overlay-style="overStyle"
                                                                        v-if="record.solutionOrAction"
                                                                        placement="right"
                                                                    >
                                                                        <template #title>
                                                                            <p
                                                                                v-for="(item, index) in handlerGetSpace(
                                                                                    record.solutionOrAction
                                                                                )"
                                                                                :key="index"
                                                                                style="margin: 0"
                                                                                >{{ item }}</p
                                                                            > </template
                                                                        ><div class="omit-div">{{ text }} </div>
                                                                    </a-tooltip>
                                                                </div>
                                                            </template>
                                                            <template v-if="column.dataIndex === 'questionDescription'">
                                                                <div class="question-div">
                                                                    <a-tooltip
                                                                        :overlay-style="overStyle"
                                                                        v-if="record.questionDescription"
                                                                        placement="right"
                                                                    >
                                                                        <template #title>
                                                                            <p
                                                                                v-for="(item, index) in handlerGetSpace(
                                                                                    record.questionDescription
                                                                                )"
                                                                                :key="index"
                                                                                style="margin: 0"
                                                                                >{{ item }}</p
                                                                            > </template
                                                                        ><div class="omit-div-question"
                                                                            ><span v-if="record.questionDescription">{{
                                                                                text
                                                                            }}</span></div
                                                                        >
                                                                    </a-tooltip>
                                                                </div>
                                                            </template>
                                                            <template
                                                                v-if="column.dataIndex === 'projectProgressStatus'"
                                                            >
                                                                <div class="question-div">
                                                                    <a-tooltip
                                                                        :overlay-style="overStyle"
                                                                        v-if="record.projectProgressStatus"
                                                                        placement="right"
                                                                    >
                                                                        <template #title>
                                                                            <p
                                                                                v-for="(item, index) in handlerGetSpace(
                                                                                    record.projectProgressStatus
                                                                                )"
                                                                                :key="index"
                                                                                style="margin: 0"
                                                                                >{{ item }}</p
                                                                            > </template
                                                                        ><div class="omit-div-status"
                                                                            ><span
                                                                                v-if="record.projectProgressStatus"
                                                                                >{{ text }}</span
                                                                            ></div
                                                                        >
                                                                    </a-tooltip>
                                                                </div>
                                                            </template>
                                                            <template v-if="column.dataIndex === 'taskOrWorkOrder'">
                                                                <a-tooltip :overlay-style="overStyle">
                                                                    <template #title>
                                                                        <template v-if="record.workOrderNumber">
                                                                            <p
                                                                                v-for="(item, index) in handlerGetSpace(
                                                                                    record.workOrderNumber
                                                                                )"
                                                                                :key="index"
                                                                                style="margin: 0"
                                                                                >{{ item }}</p
                                                                            >
                                                                        </template>
                                                                        <template v-else>{{ text }}</template>
                                                                    </template>
                                                                    <div
                                                                        style="
                                                                            overflow: hidden;
                                                                            text-overflow: ellipsis;
                                                                            white-space: nowrap;
                                                                        "
                                                                        ><a
                                                                            v-if="record.workOrderNumber"
                                                                            href="#"
                                                                            @click="jumpGd(record)"
                                                                            style="
                                                                                color: #3875ff;
                                                                                text-decoration: underline;
                                                                            "
                                                                            >{{ text }}</a
                                                                        >
                                                                        <span v-else>{{ text }}</span>
                                                                    </div>
                                                                </a-tooltip>
                                                            </template>
                                                            <template
                                                                v-if="column.dataIndex === 'completionStatusFeedback'"
                                                            >
                                                                <div class="productionPlan-div">
                                                                    <a-tooltip
                                                                        :overlay-style="overStyle"
                                                                        v-if="record.completionStatusFeedback"
                                                                        placement="right"
                                                                    >
                                                                        <template #title>
                                                                            <p
                                                                                v-for="(item, index) in handlerGetSpace(
                                                                                    text
                                                                                )"
                                                                                :key="index"
                                                                                style="margin: 0"
                                                                                >{{ item }}</p
                                                                            > </template
                                                                        ><div
                                                                            class="omit-div-productionPlan"
                                                                            v-if="text"
                                                                            >{{ text }}</div
                                                                        >
                                                                    </a-tooltip>
                                                                </div>
                                                            </template>
                                                            <template v-if="column.dataIndex === 'responsiblePerson'">
                                                                {{ record.responsiblePersonList?.join(',') }}
                                                            </template>
                                                        </template>
                                                        <template v-if="column.dataIndex === 'count'">
                                                            {{ index + 1 }}
                                                        </template>
                                                        <!--                                转Faq状态-->
                                                        <template v-if="column.dataIndex === 'zfaq'">
                                                            {{ record.faqMilepost ? '已转FAQ' : '未转FAQ' }}
                                                        </template>
                                                        <!--                                转Faq状态-->
                                                        <!--                                转工单状态-->
                                                        <template v-if="column.dataIndex === 'finishStatus'">
                                                            <template
                                                                v-if="
                                                                    record.isEdit &&
                                                                    !record.workOrderNumber &&
                                                                    !record.taskId &&
                                                                    record.id
                                                                "
                                                            >
                                                                <a-select
                                                                    style="width: 100%"
                                                                    v-model:value="record.finishStatus"
                                                                    :options="[
                                                                        {
                                                                            label: '未开始',
                                                                            value: '未开始'
                                                                        },
                                                                        {
                                                                            label: '处理中',
                                                                            value: '处理中'
                                                                        },
                                                                        {
                                                                            label: '已完成',
                                                                            value: '已完成'
                                                                        }
                                                                    ]"
                                                                />
                                                            </template>
                                                            <template v-else
                                                                ><div
                                                                    class="status-div"
                                                                    :style="{ backgroundColor: getTextColor(text) }"
                                                                    >{{ text }}
                                                                </div>
                                                            </template>
                                                        </template>
                                                        <!--                                转工单状态-->
                                                    </template>
                                                </a-table>
                                            </div>
                                        </div>
                                    </transition>
                                </div>
                            </div>
                        </div>
                        <div colspan="" v-if="viewType === '表格展示'">
                            <div class="table-box-story">
                                <div class="expend-btn" @click="toggleExpandAll">
                                    <a-spin :spinning="expendSping">
                                        <PlusSquareOutlined v-if="!isAllExpanded" title="展开全部" />
                                        <MinusSquareOutlined v-if="isAllExpanded" title="收起全部" />
                                    </a-spin>
                                </div>
                                <a-table
                                    :columns="columns"
                                    :dataSource="mettingState.dataSource"
                                    :pagination="false"
                                    bordered
                                    size="small"
                                    row-key="id"
                                    :scroll="{ y: mettingState.tableHeight }"
                                    @resizeColumn="handleResizeStoryColumn"
                                    :expandedRowKeys="mettingState.expandedRowKeys"
                                    @expandedRowsChange="keys => (mettingState.expandedRowKeys = keys)"
                                >
                                    <template #bodyCell="{ column, record, index }">
                                        <template v-if="column.dataIndex === 'fatherOpration'">
                                            <a-space :size="0">
                                                <a-button
                                                    v-permission="'3000000996_vid_43asht8k4q'"
                                                    type="link"
                                                    size="small"
                                                    ghost
                                                    @click="handleEditMeet(record)"
                                                    >编辑</a-button
                                                >
                                                <a-popconfirm
                                                    title="确定删除吗"
                                                    ok-text="确定"
                                                    cancel-text="取消"
                                                    @confirm="handleDeleteMeet(record.id, index)"
                                                    @cancel="cancel"
                                                >
                                                    <a-button
                                                        type="link"
                                                        v-permission="'3000000996_vid_km7ujixq9g'"
                                                        size="small"
                                                        ghost
                                                        >删除</a-button
                                                    >
                                                </a-popconfirm>
                                                <a-button
                                                    type="link"
                                                    size="small"
                                                    @click="showTableCheck(record, index)"
                                                    >{{ record.showCheckbox ? '确定' : '取消展示' }}</a-button
                                                >
                                                <a-button
                                                    type="link"
                                                    size="small"
                                                    @click="handleAddAction(record, index)"
                                                    v-permission="'3000000996_vid_5ho9jwfmmj'"
                                                    >新建行动项</a-button
                                                >
                                                <a-dropdown>
                                                    <template #overlay>
                                                        <a-menu @click="handleMenuClick">
                                                            <!-- 预警 -->
                                                            <a-menu-item
                                                                key="1"
                                                                v-permission="'3000000996_vid_qmwcgj4dke'"
                                                            >
                                                                <a-button
                                                                    type="link"
                                                                    size="small"
                                                                    ghost
                                                                    @click="showDiff(record)"
                                                                    class="btn-father"
                                                                    >版本对比</a-button
                                                                >
                                                            </a-menu-item>

                                                            <!-- 历史备注 -->
                                                            <a-menu-item
                                                                key="2"
                                                                v-permission="'3000000996_vid_fyss2i6xxj'"
                                                            >
                                                                <a-button
                                                                    type="link"
                                                                    size="small"
                                                                    ghost
                                                                    @click="showRemind(record)"
                                                                    class="btn-father"
                                                                    >移动端提醒</a-button
                                                                >
                                                            </a-menu-item>

                                                            <a-menu-item
                                                                key="3"
                                                                v-permission="'3000000996_vid_bbdtdrw6tv'"
                                                            >
                                                                <a-button
                                                                    type="link"
                                                                    size="small"
                                                                    ghost
                                                                    @click="getAction(record)"
                                                                    class="btn-father"
                                                                    >问题维护</a-button
                                                                >
                                                            </a-menu-item>
                                                        </a-menu>
                                                    </template>
                                                    <a-button
                                                        size="small"
                                                        type="link"
                                                        v-if="record.taskType !== '问题'"
                                                    >
                                                        更多
                                                        <EllipsisOutlined
                                                            style="rotate: 90deg; font-size: 14px; margin: 0"
                                                        />
                                                    </a-button>
                                                </a-dropdown>
                                            </a-space>
                                        </template>
                                        <template v-if="column.dataIndex === 'enclosureDtoList'">
                                            <div
                                                v-for="(item, index) in record.enclosureDtoList"
                                                :key="index"
                                                style="
                                                    max-width: 200px;
                                                    white-space: nowrap;
                                                    overflow: hidden;
                                                    text-overflow: ellipsis;
                                                "
                                            >
                                                <a :href="item.url" target="_blank">{{ item.name }}</a>
                                            </div>
                                        </template>

                                        <template v-if="column.dataIndex === 'videoLinks'">
                                            <div
                                                v-for="(item, index) in record.videoLinks"
                                                :key="index"
                                                style="
                                                    max-width: 200px;
                                                    white-space: nowrap;
                                                    overflow: hidden;
                                                    text-overflow: ellipsis;
                                                "
                                            >
                                                <a @click="showVideo(item)">{{ item }}</a>
                                            </div>
                                        </template>
                                    </template>
                                    <template #expandedRowRender="{ record: parentRecord }">
                                        <a-table
                                            :columns="columnState.baseColumns.filter(col => col.visible)"
                                            :dataSource="parentRecord.meetingQuestionList"
                                            :pagination="false"
                                            bordered
                                            @resizeColumn="handleResizeColumn"
                                            :showSorterTooltip="false"
                                            ref="tableRef"
                                            class="table-box-task"
                                            :rowKey="'id'"
                                            :rowSelection="
                                                parentRecord.showCheckbox
                                                    ? {
                                                          selectedRowKeys: parentRecord.selectedRowKeys,
                                                          onChange: selectedKeys =>
                                                              onSelectChange(selectedKeys, parentRecord)
                                                      }
                                                    : null
                                            "
                                        >
                                            <template #headerCell="{ column, title }">
                                                <template v-if="title === 'PMO'">
                                                    <div style="text-align: center; position: relative">
                                                        PMO
                                                        <div
                                                            class="togle-div"
                                                            @click.stop="toggleColumns"
                                                            style="
                                                                cursor: pointer;
                                                                display: flex;
                                                                justify-content: center;
                                                                align-items: center;
                                                            "
                                                        >
                                                            <template v-if="showAllColumns">
                                                                <LeftCircleOutlined />
                                                            </template>
                                                            <template v-else>
                                                                <RightCircleOutlined />
                                                            </template>
                                                        </div>
                                                    </div>
                                                </template>
                                            </template>

                                            <template #bodyCell="{ record, text, column, index }">
                                                <template v-if="column.dataIndex == 'opration'">
                                                    <a-space>
                                                        <a-button
                                                            size="small"
                                                            type="link"
                                                            v-permission="'3000000996_vid_6gha3fezlj'"
                                                            @click="handleAddSonTask(record, parentRecord.id)"
                                                            :disabled="
                                                                record.projectType === '交付项目' ||
                                                                !record.projectType ||
                                                                !record.id ||
                                                                record.taskId
                                                            "
                                                            >转任务</a-button
                                                        >
                                                        <a-button
                                                            size="small"
                                                            type="link"
                                                            @click="showGd(record, item)"
                                                            v-permission="'3000000996_vid_bdlemmsh07'"
                                                            :disabled="
                                                                record.projectType === '平台项目' ||
                                                                record.workOrderNumber ||
                                                                !record.id
                                                            "
                                                            >转工单</a-button
                                                        >
                                                        <a-button
                                                            size="small"
                                                            v-permission="'3000000996_vid_76z92gon83'"
                                                            type="link"
                                                            @click="showFaq(parentRecord, record)"
                                                            :disabled="record.projectType === '平台项目' || !record.id"
                                                            >转FAQ</a-button
                                                        >
                                                        <a-button
                                                            size="small"
                                                            type="link"
                                                            v-permission="'3000000996_vid_cpkar9dpsp'"
                                                            v-if="record.isEdit"
                                                            @click="confirmLhwt(record, parentRecord.id, parentRecord)"
                                                            :loading="record.okBtnLoading"
                                                            >完成</a-button
                                                        >
                                                        <a-button
                                                            size="small"
                                                            type="link"
                                                            v-permission="'3000000996_vid_cpkar9dpsp'"
                                                            :loading="record.editLoading"
                                                            v-else
                                                            :disabled="!record.id"
                                                            @click="handleEdit(record)"
                                                            >编辑</a-button
                                                        >

                                                        <a-popconfirm
                                                            title="确定删除吗?"
                                                            @confirm="
                                                                confirmDeleteLhwt(
                                                                    record,
                                                                    record.id,
                                                                    index,
                                                                    parentRecord.id
                                                                )
                                                            "
                                                        >
                                                            <a-button
                                                                v-permission="'3000000996_vid_p41eskpi4q'"
                                                                size="small"
                                                                type="link"
                                                                >删除</a-button
                                                            >
                                                        </a-popconfirm>
                                                    </a-space>
                                                </template>
                                                <!-- 编辑状态下，展示输入框或选择框 -->
                                                <template v-if="record.isEdit">
                                                    <!--                                记录日期-->
                                                    <template v-if="column.dataIndex === 'meetingDate'">
                                                        <a-date-picker
                                                            :valueFormat="'YYYY-MM-DD'"
                                                            style="width: 100%; padding-left: 12px"
                                                            v-model:value="record.meetingDate"
                                                            placeholder="选择日期"
                                                        />
                                                    </template>
                                                    <!--                                记录日期-->
                                                    <!--                                风险类型-->
                                                    <template v-if="column.dataIndex === 'riskType'">
                                                        <a-select
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.riskType"
                                                            :options="lhwtState.fxlxList"
                                                            placeholder="请选择"
                                                            :field-names="{
                                                                label: 'itemName',
                                                                value: 'itemName'
                                                            }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.itemName
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                        />
                                                    </template>
                                                    <!--                                风险类型-->
                                                    <!--                                区域-->
                                                    <template v-if="column.dataIndex === 'areaName'">
                                                        <a-select
                                                            v-if="record.projectType === '交付项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.areaCode"
                                                            :options="lhwtState.areaNameList"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'label', value: 'value' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.label
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            @change="areaChange(record)"
                                                        />
                                                        <!--                                                                <div class="validate-icon"></div>-->
                                                        <!--                                                            </div>-->
                                                        <a-select
                                                            v-if="record.projectType === '平台项目'"
                                                            allow-clear
                                                            show-search
                                                            disabled
                                                            style="width: 100%"
                                                            v-model:value="record.areaCode"
                                                            :options="lhwtState.areaNameList"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'label', value: 'value' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.label
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            @change="areaChange(record)"
                                                        />
                                                    </template>
                                                    <!--                                区域-->
                                                    <!--                                会议类型-->
                                                    <template v-if="column.dataIndex === 'meetingSources'">
                                                        <a-select
                                                            style="width: 100%"
                                                            allow-clear
                                                            mode="multiple"
                                                            show-search
                                                            v-model:value="record.meetingSourceList"
                                                            :options="lhwtState.hylyList"
                                                            placeholder="请选择"
                                                            :field-names="{
                                                                label: 'itemName',
                                                                value: 'itemName'
                                                            }"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                会议类型-->
                                                    <!--                                产品线-->
                                                    <template v-if="column.dataIndex === 'productLine'">
                                                        <a-select
                                                            style="width: 100%"
                                                            allow-clear
                                                            mode="multiple"
                                                            show-search
                                                            v-model:value="record.productLineList"
                                                            :options="lhwtState.productLineList"
                                                            placeholder="请选择"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                产品线-->
                                                    <!--                                工厂/项目名称-->
                                                    <template v-if="column.dataIndex === 'projectShortName'">
                                                        <a-select
                                                            v-if="record.projectType === '交付项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.projectId"
                                                            :options="lhwtState.projectList"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'label', value: 'value' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.label
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            @change="factoryChange(record)"
                                                            @focus="getFactory(record)"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                        <a-select
                                                            v-if="record.projectType === '平台项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.projectId"
                                                            :options="lhwtState.projectNameList"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'label', value: 'value' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.label
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            @focus="getProjectNameList(record)"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                 工厂/项目名称-->
                                                    <!--                                项目总监-->
                                                    <template v-if="column.dataIndex === 'projectDirector'">
                                                        <a-select
                                                            :disabled="record.projectType === '平台项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.projectDirector"
                                                            :options="lhwtState.allUser"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'name', value: 'name' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.name
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :max-tag-count="2"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                项目总监-->
                                                    <!--                                项目经理-->
                                                    <template v-if="column.dataIndex === 'pmName'">
                                                        <a-select
                                                            :disabled="record.projectType === '平台项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.pmName"
                                                            :options="lhwtState.allUser"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'name', value: 'name' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.name
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :max-tag-count="2"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                项目经理-->
                                                    <!--                                问题&风险描述-->
                                                    <template v-if="column.dataIndex === 'questionDescription'">
                                                        <a-textarea
                                                            v-model:value="record.questionDescription"
                                                            placeholder="请输入问题描述"
                                                            :rows="1"
                                                        />
                                                    </template>
                                                    <!--                                问题&风险描述-->
                                                    <!--                                pmo-->
                                                    <template v-if="column.dataIndex === 'pmo'">
                                                        <a-select
                                                            :disabled="record.projectType === '平台项目'"
                                                            allow-clear
                                                            show-search
                                                            style="width: 100%"
                                                            v-model:value="record.pmo"
                                                            :options="lhwtState.allUser"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'name', value: 'name' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.name
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :max-tag-count="2"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                                pmo-->
                                                    <!--                                项目进展状态-->
                                                    <template v-if="column.dataIndex === 'projectProgressStatus'">
                                                        <a-textarea
                                                            v-model:value="record.projectProgressStatus"
                                                            placeholder="请输入项目进展状态"
                                                            :rows="1"
                                                        />
                                                    </template>
                                                    <!--                                项目进展状态-->
                                                    <!--                                解决方案及行动项-->
                                                    <template v-if="column.dataIndex === 'solutionOrAction'">
                                                        <a-textarea
                                                            v-model:value="record.solutionOrAction"
                                                            :rows="1"
                                                            placeholder="请输入解决方案/行动项"
                                                        />
                                                    </template>
                                                    <!--                                解决方案及行动项-->
                                                    <!--                                计划解决日期-->
                                                    <template v-if="column.dataIndex === 'endTime'">
                                                        <a-date-picker
                                                            :valueFormat="'YYYY-MM-DD'"
                                                            style="width: 100%"
                                                            v-model:value="record.endTime"
                                                            placeholder="选择日期"
                                                        />
                                                    </template>
                                                    <!--                                计划解决日期-->
                                                    <!--                              完成情况反馈  -->
                                                    <template v-if="column.dataIndex === 'completionStatusFeedback'">
                                                        <a-textarea
                                                            v-model:value="record.completionStatusFeedback"
                                                            :rows="1"
                                                            placeholder="请输入完成情况说明"
                                                        />
                                                    </template>
                                                    <!--                              完成情况反馈  -->
                                                    <!--                              责任人  -->
                                                    <template v-if="column.dataIndex === 'responsiblePerson'">
                                                        <a-select
                                                            allow-clear
                                                            show-search
                                                            mode="multiple"
                                                            :max-tag-count="1"
                                                            style="width: 100%"
                                                            v-model:value="record.responsiblePersonList"
                                                            :options="lhwtState.allUser"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'name', value: 'name' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.name
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                              责任人  -->
                                                    <!--                              问题类型  -->
                                                    <template v-if="column.dataIndex === 'questionTypeFirst'">
                                                        <a-tree-select
                                                            v-model:value="record.questionTypeSecond"
                                                            show-search
                                                            treeDefaultExpandAll
                                                            style="width: 100%"
                                                            placeholder="请选择"
                                                            allow-clear
                                                            :tree-data="lhwtState.wtlxList"
                                                            :fieldNames="{
                                                                children: 'children',
                                                                label: 'itemName',
                                                                value: 'itemName',
                                                                key: 'itemCode'
                                                            }"
                                                            :filterTreeNode="
                                                                (inputValue, treeNode) => {
                                                                    return (
                                                                        treeNode.itemName
                                                                            .toLowerCase()
                                                                            .indexOf(inputValue.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :max-tag-count="1"
                                                        />
                                                    </template>
                                                    <!--                              问题类型  -->
                                                    <!--                              项目类型  -->
                                                    <template v-if="column.dataIndex === 'projectType'">
                                                        <a-select
                                                            allow-clear
                                                            style="width: 100%"
                                                            show-search
                                                            v-model:value="record.projectType"
                                                            :options="[
                                                                {
                                                                    label: '交付项目',
                                                                    value: '交付项目'
                                                                },
                                                                {
                                                                    label: '平台项目',
                                                                    value: '平台项目'
                                                                }
                                                            ]"
                                                            placeholder="请选择"
                                                            :field-names="{ label: 'label', value: 'value' }"
                                                            :filterOption="
                                                                (input, option) => {
                                                                    return (
                                                                        option.label
                                                                            .toLowerCase()
                                                                            .indexOf(input.toLowerCase()) >= 0
                                                                    )
                                                                }
                                                            "
                                                            :max-tag-count="2"
                                                            :getPopupContainer="getPopupContainer"
                                                            @change="projectTypeChange(record)"
                                                        />
                                                    </template>
                                                    <!--                              项目类型  -->
                                                    <!--                              是否为共性问题  -->
                                                    <template v-if="column.dataIndex === 'commonProblems'">
                                                        <a-select
                                                            allow-clear
                                                            style="width: 100%"
                                                            placeholder="请选择"
                                                            :options="[
                                                                {
                                                                    label: '是',
                                                                    value: '是'
                                                                },
                                                                {
                                                                    label: '否',
                                                                    value: '否'
                                                                }
                                                            ]"
                                                            v-model:value="record.commonProblems"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                              是否为共性问题  -->
                                                    <!--                              体系闭环  -->
                                                    <template v-if="column.dataIndex === 'systemClosedLoop'">
                                                        <a-select
                                                            show-search
                                                            style="width: 100%"
                                                            allow-clear
                                                            placeholder="请选择"
                                                            :options="lhwtState.txbhList"
                                                            v-model:value="record.systemClosedLoop"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                              体系闭环  -->
                                                    <!--                              解决方案  -->
                                                    <template v-if="column.dataIndex === 'solution'">
                                                        <a-select
                                                            style="width: 100%"
                                                            allow-clear
                                                            show-search
                                                            placeholder="请选择"
                                                            :options="lhwtState.jjfaList"
                                                            v-model:value="record.solution"
                                                            :getPopupContainer="getPopupContainer"
                                                        />
                                                    </template>
                                                    <!--                              解决方案  -->
                                                </template>
                                                <!-- 非编辑状态下，展示原始文本 -->
                                                <template v-else>
                                                    <template v-if="['工厂名称'].includes(column.title)">
                                                        <div class="db-click-name" :title="text">{{ text }}</div>
                                                    </template>
                                                    <template
                                                        v-if="
                                                            ['区域', '日期', '项目总监', '项目经理'].includes(
                                                                column.title
                                                            )
                                                        "
                                                    >
                                                        <div class="db-click">{{ text }}</div>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'solutionOrAction'">
                                                        <div class="progress-click">
                                                            <a-tooltip
                                                                :overlay-style="overStyle"
                                                                v-if="record.solutionOrAction"
                                                                placement="right"
                                                            >
                                                                <template #title>
                                                                    <p
                                                                        v-for="(item, index) in handlerGetSpace(
                                                                            record.solutionOrAction
                                                                        )"
                                                                        :key="index"
                                                                        style="margin: 0"
                                                                        >{{ item }}</p
                                                                    > </template
                                                                ><div class="omit-div">{{ text }} </div>
                                                            </a-tooltip>
                                                        </div>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'questionDescription'">
                                                        <div class="question-div">
                                                            <a-tooltip
                                                                :overlay-style="overStyle"
                                                                v-if="record.questionDescription"
                                                                placement="right"
                                                            >
                                                                <template #title>
                                                                    <p
                                                                        v-for="(item, index) in handlerGetSpace(
                                                                            record.questionDescription
                                                                        )"
                                                                        :key="index"
                                                                        style="margin: 0"
                                                                        >{{ item }}</p
                                                                    > </template
                                                                ><div class="omit-div-question"
                                                                    ><span v-if="record.questionDescription">{{
                                                                        text
                                                                    }}</span></div
                                                                >
                                                            </a-tooltip>
                                                        </div>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'projectProgressStatus'">
                                                        <div class="question-div">
                                                            <a-tooltip
                                                                :overlay-style="overStyle"
                                                                v-if="record.projectProgressStatus"
                                                                placement="right"
                                                            >
                                                                <template #title>
                                                                    <p
                                                                        v-for="(item, index) in handlerGetSpace(
                                                                            record.projectProgressStatus
                                                                        )"
                                                                        :key="index"
                                                                        style="margin: 0"
                                                                        >{{ item }}</p
                                                                    > </template
                                                                ><div class="omit-div-status"
                                                                    ><span v-if="record.projectProgressStatus">{{
                                                                        text
                                                                    }}</span></div
                                                                >
                                                            </a-tooltip>
                                                        </div>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'taskOrWorkOrder'">
                                                        <a-tooltip :overlay-style="overStyle">
                                                            <template #title>
                                                                <template v-if="record.workOrderNumber">
                                                                    <p
                                                                        v-for="(item, index) in handlerGetSpace(
                                                                            record.workOrderNumber
                                                                        )"
                                                                        :key="index"
                                                                        style="margin: 0"
                                                                        >{{ item }}</p
                                                                    >
                                                                </template>
                                                                <template v-else>{{ text }}</template>
                                                            </template>
                                                            <div
                                                                style="
                                                                    overflow: hidden;
                                                                    text-overflow: ellipsis;
                                                                    white-space: nowrap;
                                                                "
                                                                ><a
                                                                    v-if="record.workOrderNumber"
                                                                    href="#"
                                                                    @click="jumpGd(record)"
                                                                    style="color: #3875ff; text-decoration: underline"
                                                                    >{{ text }}</a
                                                                >
                                                                <span v-else>{{ text }}</span>
                                                            </div>
                                                        </a-tooltip>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'completionStatusFeedback'">
                                                        <div class="productionPlan-div">
                                                            <a-tooltip
                                                                :overlay-style="overStyle"
                                                                v-if="record.completionStatusFeedback"
                                                                placement="right"
                                                            >
                                                                <template #title>
                                                                    <p
                                                                        v-for="(item, index) in handlerGetSpace(text)"
                                                                        :key="index"
                                                                        style="margin: 0"
                                                                        >{{ item }}</p
                                                                    > </template
                                                                ><div class="omit-div-productionPlan" v-if="text">{{
                                                                    text
                                                                }}</div>
                                                            </a-tooltip>
                                                        </div>
                                                    </template>
                                                    <template v-if="column.dataIndex === 'responsiblePerson'">
                                                        {{ record.responsiblePersonList?.join(',') }}
                                                    </template>
                                                </template>
                                                <template v-if="column.dataIndex === 'count'">
                                                    {{ index + 1 }}
                                                </template>
                                                <!--                                转Faq状态-->
                                                <template v-if="column.dataIndex === 'zfaq'">
                                                    {{ record.faqMilepost ? '已转FAQ' : '未转FAQ' }}
                                                </template>
                                                <!--                                转Faq状态-->
                                                <!--                                转工单状态-->
                                                <template v-if="column.dataIndex === 'finishStatus'">
                                                    <template
                                                        v-if="
                                                            record.isEdit &&
                                                            !record.workOrderNumber &&
                                                            !record.taskId &&
                                                            record.id
                                                        "
                                                    >
                                                        <a-select
                                                            style="width: 100%"
                                                            v-model:value="record.finishStatus"
                                                            :options="[
                                                                {
                                                                    label: '未开始',
                                                                    value: '未开始'
                                                                },
                                                                {
                                                                    label: '处理中',
                                                                    value: '处理中'
                                                                },
                                                                {
                                                                    label: '已完成',
                                                                    value: '已完成'
                                                                }
                                                            ]"
                                                        />
                                                    </template>
                                                    <template v-else
                                                        ><div
                                                            class="status-div"
                                                            :style="{ backgroundColor: getTextColor(text) }"
                                                            >{{ text }}
                                                        </div>
                                                    </template>
                                                </template>
                                                <!--                                转工单状态-->
                                            </template>
                                        </a-table>
                                    </template>
                                </a-table>
                            </div>
                        </div>
                        <template v-if="mettingState.dataSource.length == 0">
                            <div class="no-data-img"></div>
                            <div class="no-data-msg">暂无数据</div>
                        </template>
                    </div>
                </a-spin>
            </div>
            <div class="pagination-div">
                <a-pagination
                    v-model:current="pagination.current"
                    :total="pagination.total"
                    :show-total="pagination.showTotal"
                    :page-size="pagination.pageSize"
                    :show-size-changer="true"
                    @change="pageChange"
                />
            </div>
            <!-- end vid_hyun7rbd2w 自定义模板_bngazh2iex -->
        </a-spin>
    </div>
</template>
<script setup lang="tsx">
    import {
        h,
        ref,
        reactive,
        toRaw,
        markRaw,
        watch,
        computed,
        onBeforeMount,
        onMounted,
        onBeforeUnmount,
        onUnmounted,
        onActivated,
        onDeactivated
    } from 'vue'
    import { useRoute, useRouter } from 'vue-router'
    const router = useRouter()
    const route = useRoute()
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios'
    import {
        cloneDeep,
        localGet,
        merge,
        getDifferenceArray,
        traversalTreeStructure,
        checkCaseCondition,
        renderStringInTemplate,
        handleBreadcrumbJump,
        throttle,
        permission,
        getComponentParamsValue
    } from '@/utils/index'
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is'
    import dayjs from 'dayjs'
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart'
    import { message, notification, Modal } from 'ant-design-vue'
    import {
        propertyFormatByNumber,
        propertyFormatByPercentage,
        propertyFormatByDate,
        parseSubFromDataList
    } from '@/utils/format'
    import colorTheme from '@/design/custom-theme.json'
    /*** PUBLISH_EXEGESIS ***
 import UserTableRecords from '@/model/UserTableRecords';
 import { getAppBaseUrl } from '@/utils/index';
 import { sendToken } from "@/hooks/useIframeToken";
 import { useSystemStore } from "@/store/modules/system";
 const systemStore = useSystemStore();
 *** PUBLISH_EXEGESIS ***/

    // 获取传入的流程ID和组件参数
    const props = defineProps({
        'processInstanceId': {
            type: [String, Number, Boolean],
            default: undefined
        }
    })
    const immediateWatch = (source, callback) => {
        watch(source, callback, { deep: true, immediate: true })
    }

    /* -------------------------- 属性定义 -------------------------- */

    const setTimeOutList = []
    const pageLoading = reactive({
        loading: false,
        tip: undefined
    })
    const authInfo = localGet('app-user-store')

    // 处理校验
    const setSubFormName = (parentInfo, name) => {
        return [parentInfo.parents, parentInfo.cycleIndex, name]
    }

    /* ========================== 属性定义 ========================== */

    /* -------------------------- 元素数据引用 -------------------------- */

    /* ========================== 元素数据引用 ========================== */

    /* -------------------------- 页面数据 -------------------------- */

    /* ========================== 页面数据 ========================== */

    /* -------------------------- 响应 -------------------------- */

    /* ========================== 响应 ========================== */

    /* -------------------------- 函数 -------------------------- */

    /* ========================== 函数 ========================== */

    /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId
    })

    /* ========================== 页面参数 ========================== */

    /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------

    // ============================ 组件数据同步 ============================

    /* ========================== 组件事件处理方法 ========================== */

    /* -------------------------- 生命周期 -------------------------- */
    // 用于参数变更后重新执行自定义指令
    const queryUpdateFlag = ref(0)
    onMounted(() => {})

    onUnmounted(() => {
        // 销毁定时器
        setTimeOutList.forEach(({ repeat, timer }) => {
            repeat ? clearInterval(timer) : clearTimeout(timer)
        })
    })
    const text = 'www.baidu.com;www.ali.com'
    /* ========================== 生命周期 ========================== */

    /* -------------------------- 数据关联处理 -------------------------- */

    /* -------------------------- 表单数据同步 -------------------------- */
    /* ========================== 表单数据同步 ========================== */

    /* ========================== 数据关联处理 ========================== */

    /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */

    /* ========================== 不同组件自定义的处理逻辑 ========================== */

    // ================================定制化逻辑========================================
    import { nextTick } from 'vue'
    import { QuillEditor, Quill } from '@vueup/vue-quill'
    import ImageUploader from 'quill-image-uploader'
    import '@vueup/vue-quill/dist/vue-quill.snow.css'
    const titleConfig = [
        { Choice: ' .ql-bold', title: '加粗' },
        { Choice: ' .ql-italic', title: '斜体' },
        { Choice: ' .ql-underline', title: '下划线' },
        { Choice: ' .ql-strike', title: '删除线' },
        { Choice: ' .ql-blockquote', title: '块引用' },
        { Choice: ' .ql-code-block', title: '插入代码' },
        { Choice: ' .ql-size', title: '字体大小' },
        { Choice: ' .ql-size', title: '字体大小' },
        { Choice: ' .ql-color', title: '字体颜色' },
        { Choice: ' .ql-background', title: '字体背景颜色' },
        { Choice: ' .ql-list[value="ordered"]', title: '有序列表' },
        { Choice: ' .ql-list[value="bullet"]', title: '无序列表' },
        { Choice: ' .ql-header[value="1"]', title: '1级标题' },
        { Choice: ' .ql-header[value="2"]', title: '2级标题' },
        { Choice: ' .ql-align', title: '对齐方式' },
        { Choice: ' .ql-clean', title: '清除字体格式' },
        { Choice: ' .ql-image', title: '图像' },
        { Choice: ' .ql-size .ql-picker-item[data-value="small"]', title: '小号' },
        { Choice: ' .ql-size .ql-picker-item[data-value="large"]', title: '大号' },
        { Choice: ' .ql-size .ql-picker-item[data-value="huge"]', title: '超大号' },
        { Choice: ' .ql-size .ql-picker-item:nth-child(2)', title: '标准' },
        { Choice: ' .ql-align .ql-picker-item:first-child', title: '居左对齐' },
        { Choice: ' .ql-align .ql-picker-item[data-value="center"]', title: '居中对齐' },
        { Choice: ' .ql-align .ql-picker-item[data-value="right"]', title: '居右对齐' },
        { Choice: ' .ql-align .ql-picker-item[data-value="justify"]', title: '两端对齐' }
    ]
    // 注册图片上传模块
    Quill.register('modules/imageUploader', ImageUploader)

    // 将本地文件转换为URL
    const getLocalImageURL = file => {
        return new Promise(resolve => {
            const reader = new FileReader()
            reader.onload = e => {
                resolve(e.target.result)
            }
            reader.readAsDataURL(file)
        })
    }

    // 表单数据

    // Quill 编辑器选项
    const editorOption = ref({
        modules: {
            // imageUploader: {
            //     upload: async file => {
            //         const localUrl = await getLocalImageURL(file)
            //         return localUrl // 返回本地图片的 URL 进行预览
            //     }
            // },
            toolbar: [
                ['bold', 'italic', 'underline', 'strike'], // 加粗，斜体，下划线，删除线
                // ['blockquote', 'code-block'], // 引用，代码块
                // [{ header: 1 }, { header: 2 }], // 标题1，标题2
                [{ list: 'ordered' }, { list: 'bullet' }], // 有序列表，无序列表
                [{ size: ['small', false, 'large', 'huge'] }], // 文字大小
                [{ color: [] }, { background: [] }], // 字体颜色，背景颜色
                [{ align: [] }], // 对齐
                ['clean'],
                ['image'] // 清除格式 // 链接，图片，视频
            ]
            // ImageUploader: imageHandler
        }
    })

    // 将 dataURL 转换为 File 对象的辅助函数
    const dataURLtoFile = (dataurl, filename) => {
        const arr = dataurl.split(',')
        const mime = arr[0].match(/:(.*?);/)[1]
        const bstr = atob(arr[1])
        let n = bstr.length
        const u8arr = new Uint8Array(n)
        while (n--) {
            u8arr[n] = bstr.charCodeAt(n)
        }
        return new File([u8arr], filename, { type: mime })
    }
    // 上传API
    const uploadFileAPI = async file => {
        const data = new FormData()
        data.append('file', file)

        return post('/file-storage/api/v1/file/upload', data)
            .then(({ data: { fullUrl } }) => {
                return { data: { fullUrl } }
            })
            .catch(error => {
                console.error('上传图片出错:', error)
                throw error // 抛出错误以供外部处理
            })
    }
    function initTitle() {
        // 选择所有的 ql-editor，并去除 placeholder
        document.querySelectorAll('.ql-editor').forEach(editor => {
            editor.dataset.placeholder = ''
        })

        // 遍历 titleConfig 并处理多个富文本
        for (let item of titleConfig) {
            document.querySelectorAll('.ql-toolbar' + item.Choice).forEach(tip => {
                tip.setAttribute('title', item.title)
            })
        }
    }
    const meetQuillEditor = ref(null)
    //     富文本设置
    const mettingState = reactive({
        filter: {
            meetingDate: '',
            participants: [],
            recorder: undefined,
            responsiblePerson: undefined,
            keywords: undefined
        },
        dataLoading: false,
        modalVisible: false,
        modalTitle: '新建会议纪要',
        modalForm: {
            meetingDate: undefined,
            meetingName: undefined,
            summary: undefined,
            outParticipants: undefined,
            recorder: undefined,
            labelList: [],
            enclosureDtoList: [],
            videoLinks: [{}],
            actionList: []
        },
        okLoading: false,
        importLoading: false,
        importVisible: false,
        inportFileList: [],
        dataSource: [],
        expandedRowKeys: [],
        templateUrl: undefined,
        exportLoading: false,
        factoryListMap: {},
        userListMap: {},
        tableHeight: 600
    })
    const headerOffset = ref(170)
    const calcTableHeight = () => {
        mettingState.tableHeight = window.innerHeight - 180 - headerOffset.value
    }
    onMounted(() => {
        getViewSetting()
        getMeetData()
        getAreaList()
        getGdAreaList()
        getBaseList()
        getLhwtAllUser()
        getGroup()
        getPermission()
        getClassFy()
        getTaskList()
        getWtly()
        getHyly()
        getFxLx()
        getLabelList()
        getProductLineList()
        get('/config.json').then(data => {
            mettingState.templateUrl = data.meeting_minutes_excel_template_url
        })
        calcTableHeight()
        window.addEventListener('resize', calcTableHeight)
    })
    onBeforeUnmount(() => {
        window.removeEventListener('resize', calcTableHeight)
    })
    function handlerUpload(file) {
        const data = new FormData()
        data.append('file', file)

        post('/file-storage/api/v1/file/upload', data)
            .then(({ data: { fullUrl } }) => {
                if (data) {
                    // 新文件对象
                    const newFile = {
                        uid: file.uid,
                        lastModified: file.lastModified,
                        name: file.name,
                        size: file.size,
                        type: file.type,
                        status: 'done',
                        url: fullUrl
                    }

                    // 去重，保留一个副本
                    mettingState.modalForm.enclosureDtoList = [
                        // 保留已存在文件（去除重复）
                        ...mettingState.modalForm.enclosureDtoList.filter(
                            item => item.uid !== file.uid && item.name !== file.name
                        ),
                        // 添加新的文件
                        newFile
                    ]
                }
            })
            .catch(e => {
                message.error('上传失败' + e)
            })

        return false
    }
    // 父移除文件
    function handlerRemove(file) {
        mettingState.modalForm.enclosureDtoList = mettingState.modalForm.enclosureDtoList.filter(
            item => item.uid !== file.uid
        )
    }
    function handlerUploadData(file) {
        const data = new FormData()
        data.append('file', file)

        post('/file-storage/api/v1/file/upload', data)
            .then(({ data: { fullUrl } }) => {
                if (data) {
                    // 新文件对象
                    const newFile = {
                        uid: file.uid,
                        lastModified: file.lastModified,
                        name: file.name,
                        size: file.size,
                        type: file.type,
                        status: 'done',
                        url: fullUrl,
                        originFileObj: file
                    }

                    // 去重，保留一个副本
                    mettingState.inportFileList = [
                        // 保留已存在文件（去除重复）
                        ...mettingState.inportFileList.filter(item => item.uid !== file.uid && item.name !== file.name),
                        // 添加新的文件
                        newFile
                    ]
                }
            })
            .catch(e => {
                message.error('上传失败' + e)
            })

        return false
    }
    // 父移除文件
    function handlerRemoveData(file) {
        mettingState.inportFileList = mettingState.inportFileList.filter(item => item.uid !== file.uid)
    }
    function handleAdd() {
        get('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/template_store').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            mettingState.modalForm.summary = data.data
        })
        mettingState.modalTitle = '新建会议纪要'
        currentData.value = {}
        mettingState.modalVisible = true
        mettingState.modalForm.meetingDate = dayjs().format('YYYY-MM-DD')
        nextTick(() => {
            initTitle()
        })
    }

    function downloadExcel(response, name) {
        const blob = new Blob([response], {
            type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
        })
        const downloadElement = document.createElement('a')
        const href = window.URL.createObjectURL(blob) // 创建下载的链接
        downloadElement.href = href
        downloadElement.download = name // 下载后文件名
        document.body.appendChild(downloadElement)
        downloadElement.click() // 点击下载
        document.body.removeChild(downloadElement) // 下载完成移除元素
        window.URL.revokeObjectURL(href)
        return href
    }
    //删除一个模块
    function handleDeleteLink(index) {
        if (mettingState.modalForm.videoLinks.length == 1) {
            return
        }
        mettingState.modalForm.videoLinks.splice(index, 1)
    }

    // 新插一条模块
    function handlerAddLink(index) {
        mettingState.modalForm.videoLinks.splice(index + 1, 0, { link: undefined })
    }
    const currentData = ref({})
    const formRef = ref(null)
    function confirmMeet() {
        formRef.value.validate().then(async () => {
            mettingState.okLoading = true

            // 把选中的标签 name 提交
            const selectedLabels = lhwtState.labelsList.filter(item => item.checked).map(item => item.name)

            const params = {
                ...mettingState.modalForm,
                generationMethod: 'MANNAL',
                labelList: selectedLabels // ✅ 重点：覆盖 modalForm 里的 labelList
            }

            // 处理 videoLinks
            const linksArray = mettingState.modalForm.videoLinks
                .map(item => (item?.link ? item.link.trim().replace(/^"|"$/g, '') : ''))
                .filter(link => link)

            params.videoLinks = linksArray

            // 处理 createdBy
            const userInfoStorage = localStorage.getItem('al__USER_INFO')
            if (userInfoStorage) {
                try {
                    const userInfo = JSON.parse(userInfoStorage)
                    params.createdBy = userInfo.value.name
                } catch (error) {
                    console.log(error)
                }
            }

            // 调接口
            const apiUrl = currentData.value.id
                ? '/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes'
                : ' /solution-ppm/api/v2/built-in-system-ppm/meeting_minutes'
            const apiMethod = currentData.value.id ? put : post

            apiMethod(apiUrl, params)
                .then(data => {
                    if (data.code !== 200) {
                        message.error(data.message)
                        return
                    }
                    message.success(data.message)
                    const expandedId = currentData.value.id
                    cancelMeet()
                    getMeetData().then(() => {
                        // 数据获取完成后，恢复展开状态
                        const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                        if (foundItem) {
                            foundItem.expand = true
                        }
                    })
                    currentData.value = {}
                })
                .finally(() => {
                    mettingState.okLoading = false
                })
        })
    }
    function handleTemporarilyStore() {
        // 把选中的标签 name 提交
        const selectedLabels = lhwtState.labelsList.filter(item => item.checked).map(item => item.name)
        const params = {
            ...mettingState.modalForm,
            labelList: selectedLabels // ✅ 重点：覆盖 modalForm 里的 labelList
        }
        // 处理 videoLinks
        const linksArray = mettingState.modalForm.videoLinks
            .map(item => (item?.link ? item.link.trim().replace(/^"|"$/g, '') : ''))
            .filter(link => link)

        params.videoLinks = linksArray

        put('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/template_store', params).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            message.success(data.message)
        })
    }
    function cancelMeet() {
        mettingState.modalVisible = false
        resetMeetForm()
    }
    function handleEditMeet(record) {
        currentData.value = record
        let data = cloneDeep(record)
        Object.assign(mettingState.modalForm, data)

        // ✅ 确保 `data.videoLinks` 是一个数组
        if (Array.isArray(data.videoLinks) && data.videoLinks.length > 0) {
            mettingState.modalForm.videoLinks = data.videoLinks.map(item => ({ link: item }))
        } else {
            mettingState.modalForm.videoLinks = [{ link: undefined }]
        }
        if (Array.isArray(data.participantList) && data.participantList.length > 0) {
            mettingState.modalForm.participantList = data.participantList
        } else {
            mettingState.modalForm.participantList = []
        }
        // ✅ 标签回显 (设置 labelsList 里的 checked)
        const labelNameList = Array.isArray(data.labelList) ? data.labelList : []
        lhwtState.labelsList.forEach(item => {
            item.checked = labelNameList.includes(item.name)
        })
        mettingState.modalForm.actionList = []
        mettingState.modalTitle = '编辑会议纪要'
        mettingState.modalVisible = true
    }

    function resetMeetForm() {
        mettingState.modalForm.meetingName = undefined
        mettingState.modalForm.summary = undefined
        mettingState.modalForm.enclosureDtoList = []
        mettingState.modalForm.videoLinks = [{ link: undefined }]

        mettingState.modalForm.participantList = []
        mettingState.modalForm.outParticipants = undefined
        mettingState.modalForm.recorder = undefined
        mettingState.modalForm.labelList = []

        mettingState.modalForm.actionList = []
        lhwtState.labelsList.forEach(item => {
            item.checked = false
        })
    }
    function handleDeleteMeet(id, index) {
        // 记录当前展开的 item ID
        const expandedId = id
        del(`/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/${id}`).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            message.success(data.message)
            getMeetData()
        })
    }
    function getMeetData() {
        mettingState.dataLoading = true
        return post('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/search', {
            ...mettingState.filter,
            pageSize: pagination.value.pageSize,
            pageNo: pagination.value.current
        })
            .then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return Promise.reject(data.message) // 确保错误时不会执行 .then()
                }
                mettingState.dataSource = (data.data.content || []).map(item => {
                    if (Array.isArray(item.meetingQuestionList)) {
                        item.meetingQuestionList.forEach(question => {
                            if (!Array.isArray(question.responsiblePersonList)) {
                                question.responsiblePersonList = []
                            }
                        })
                    }
                    // 2. 给每个会议 item 增加两个状态
                    item.showCheckbox = false
                    item.selectedRowKeys = []
                    return item
                })
                pagination.value.total = data.data.totalElements
                return data.data.content // 确保返回数据，外部可以使用 .then()
            })
            .finally(() => {
                mettingState.dataLoading = false
            })
    }

    function resetMeetData() {
        pagination.value.current = 1
        pagination.value.pageSize = 10
        mettingState.filter.meetingDate = ''
        mettingState.filter.keywords = undefined
        mettingState.filter.recorder = undefined
        mettingState.filter.participantList = []
        getMeetData()
    }
    function handleImport() {
        const formData = new FormData()
        mettingState.inportFileList.forEach(file => {
            formData.append('file', file.originFileObj || file) // 确保是原始文件对象
        })
        // 🔹 打印 FormData，检查数据是否正确
        for (let [key, value] of formData.entries()) {
            console.log(key, value, value instanceof File) // 确保 value 是 File 类型
        }

        post('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/import', formData, {
            headers: { 'Content-Type': 'multipart/form-data' } // 确保是文件上传格式
        })
            .then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                message.success(data.message)
                getMeetData()
                mettingState.inportFileList = []
                mettingState.importVisible = false
            })
            .catch(error => {
                message.error('上传失败，请重试')
                console.error('上传错误:', error)
            })
    }
    function inportCancel() {
        mettingState.importVisible = false
        mettingState.inportFileList = []
    }
    function handleExport() {
        mettingState.exportLoading = true
        post('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/export', mettingState.filter, {
            responseType: 'arraybuffer'
        }).then(data => {
            downloadExcel(data, '会议纪要.xlsx')
            mettingState.exportLoading = false
        })
    }
    //     问题表格
    const lhwtState = reactive({
        changeForm: {
            meetingDate: dayjs().format('YYYY-MM-DD'),
            areaCode: undefined,
            solution: undefined,
            projectId: undefined,
            projectDirector: [],
            pmName: [],
            questionDescription: undefined,
            responsiblePerson: undefined,
            endTime: undefined,
            completionStatusFeedback: undefined,
            questionTypeFirst: undefined,
            questionTypeSecond: undefined,
            faq: undefined,
            commonProblems: undefined,
            systemClosedLoop: undefined,
            finishStatus: '未启动',
            projectType: undefined,
            solutionOrAction: undefined
        },
        templateUrl: undefined,
        addOrEditVisible: false,
        permission: false,
        validateVisible: false,
        tipLoading: false,
        modalTitle: '新建问题',
        filter: {
            areaCode: undefined,
            projectDirector: undefined,
            pmName: undefined,
            questionTypeSecond: undefined,
            solution: undefined,
            faq: undefined,
            systemClosedLoop: undefined,
            finishStatus: ''
        },
        wtlxList: [],
        jjfaList: [],
        faqList: [],
        fxlxList: [],
        txbhList: [],
        finishStatusList: [],
        areaNameList: [],
        hylyList: [],
        projectList: [],
        modalProjectList: [],
        projectNameList: [],
        projectDirectorList: [],
        pmNameList: [],
        allUser: [],
        labelsList: [],
        userGroup: [],
        dataSource: [],

        tableLoading: false,
        inportFileList: [],
        importVisible: false,
        importLoading: false,
        exportLoading: false,
        productLineList: []
    })
    //     转化为工单
    const gdState = reactive({
        visible: false,
        fatherLoading: false,
        modalForm: {
            content: undefined,
            type: '问题转化',
            priority: undefined,
            questionSource: '问题转化',
            workHours: undefined,
            endTime: undefined,
            areaCode: undefined,
            projectId: undefined,
            version: undefined,
            customer: undefined,
            production: undefined,
            environment: undefined,
            description: undefined,
            monitorScene: undefined,
            solverList: [],
            descriptionAttachmentList: [],
            qillData: ''
        },
        projectList: [],
        wtlyList: [],
        customList: [],
        productList: [],
        areaList: [],
        environmentList: [],
        monitorSceneList: []
    })
    // 获取问题来源
    function getWtly() {
        get(' /solution-ppm-basic-data/api/v1/dictionary/search/GD.WTLY').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            gdState.wtlyList = data.data.map(item => {
                return {
                    label: item.itemName,
                    value: item.itemName
                }
            })
        })
    }
    const convertId = ref()
    const customCellStyle = () => {
        return {
            style: {
                padding: '0 5px'
            }
        }
    }
    const customOkCellStyle = () => {
        return {
            style: {
                padding: '4px 16px'
            }
        }
    }
    const showAllColumns = ref(false)
    function toggleColumns() {
        showAllColumns.value = !showAllColumns.value
        columnState.baseColumns.forEach(col => {
            if (col.toggleColumn) {
                col.visible = showAllColumns.value
            }
        })
    }

    const quillEditor = ref(null) // 引用QuillEditor组件
    const answerQuillEditor = ref(null) // 引用QuillEditor组件
    const columnState = reactive({
        baseColumns: [
            {
                title: '序号',
                dataIndex: 'count',
                align: 'center',
                width: 80,
                fixed: 'left',
                ellipsis: true
            },

            {
                title: '记录日期',
                dataIndex: 'meetingDate',
                align: 'center',
                width: 150,
                fixed: 'left',
                ellipsis: true,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '状态',
                dataIndex: 'finishStatus',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 150,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '工单编号/任务名称',
                dataIndex: 'taskOrWorkOrder',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 180
            },

            {
                title: '问题&风险描述',
                dataIndex: 'questionDescription',
                ellipsis: true,
                align: 'center',
                resizable: true,
                width: 350,
                minWidth: 350,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '解决方案及行动项',
                dataIndex: 'solutionOrAction',
                ellipsis: true,
                align: 'center',
                resizable: true,
                width: 350,
                minWidth: 350,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '责任人',
                dataIndex: 'responsiblePerson',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 150,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '计划完成日期',
                dataIndex: 'endTime',
                align: 'center',
                ellipsis: true,
                width: 150,
                visible: true,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '完成情况反馈',
                dataIndex: 'completionStatusFeedback',
                ellipsis: true,
                align: 'center',
                resizable: true,
                width: 350,
                minWidth: 350,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '风险类型',
                dataIndex: 'riskType',
                align: 'center',
                width: 150,
                visible: true,
                ellipsis: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '会议类型',
                dataIndex: 'meetingSources',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 200
            },
            {
                title: '产品线',
                dataIndex: 'productLine',
                align: 'center',
                visible: true,
                ellipsis: true,
                width: 120
            },
            {
                title: '问题来源',
                dataIndex: 'questionSource',
                align: 'center',
                visible: true,
                ellipsis: true,
                width: 120
            },
            {
                title: '项目类型',
                dataIndex: 'projectType',
                align: 'center',
                width: 150,
                ellipsis: true,
                visible: true,
                customHeaderCell: customCellStyle
            },

            {
                'title': '区域',
                'dataIndex': 'areaName',
                ellipsis: true,
                align: 'center',
                width: 150,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '项目/工厂名称',
                dataIndex: 'projectShortName',
                ellipsis: true,
                width: 200,
                align: 'center',
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '项目总监',
                dataIndex: 'projectDirector',
                ellipsis: true,
                align: 'center',
                visible: true,
                width: 120,
                customHeaderCell: customCellStyle
            },
            {
                title: '项目经理',
                dataIndex: 'pmName',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 120,
                customHeaderCell: customOkCellStyle
            },
            {
                title: 'PMO',
                dataIndex: 'pmo',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 120,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '问题类型',
                dataIndex: 'questionTypeFirst',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 150
            },
            {
                title: '问题二级分类',
                dataIndex: 'questionTypeSecond',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 120
            },
            {
                title: '解决方案',
                dataIndex: 'solution',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 120
            },
            {
                title: 'FAQ',
                dataIndex: 'faqMilepost',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 120
            },
            {
                title: '是否共性问题',
                dataIndex: 'commonProblems',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 120
            },
            {
                title: '体系闭环',
                dataIndex: 'systemClosedLoop',
                resizable: true,
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 120
            },
            {
                title: '项目进展状态',
                dataIndex: 'projectProgressStatus',
                align: 'center',
                resizable: true,
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 160
            },

            {
                title: '转FAQ状态',
                dataIndex: 'zfaq',
                align: 'center',
                ellipsis: true,
                toggleColumn: true, // ✅ 想控制显隐就加上
                visible: showAllColumns.value,
                width: 150,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '操作',
                dataIndex: 'opration',
                resizable: true,
                visible: true,
                align: 'center',
                fixed: 'right',
                width: 325
            }

            // 其他通用列
        ],
        oldColumns: [],
        modalColumns: [
            {
                title: '问题&风险描述',
                dataIndex: 'questionDescription',
                ellipsis: true,
                align: 'center',
                resizable: true,
                width: 150,
                minWidth: 350,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '解决方案及行动项',
                dataIndex: 'solutionOrAction',
                ellipsis: true,
                align: 'center',
                resizable: true,
                width: 150,
                minWidth: 350,
                visible: true,
                customHeaderCell: customCellStyle
            },
            {
                title: '责任人',
                dataIndex: 'responsiblePerson',
                align: 'center',
                ellipsis: true,
                visible: true,
                width: 150,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '计划完成日期',
                dataIndex: 'endTime',
                align: 'center',
                ellipsis: true,
                width: 150,
                visible: true,
                customHeaderCell: customOkCellStyle
            },
            {
                title: '操作',
                dataIndex: 'opration',
                resizable: true,
                visible: true,
                align: 'center',
                fixed: 'right',
                width: 100
            }
        ]
    })
    const overStyle = ref({
        maxWidth: '500px',
        fontSize: '16px'
    })
    const handleResizeColumn = (w, col) => {
        const width = w - 50 // 确保宽度被计算并且减去额外空间

        // 根据列标题来确定不同的 div
        let div = null
        if (col.title === '解决方案及行动项') {
            div = document.querySelectorAll('.omit-div')
        } else if (col.title.includes('问题&风险描述')) {
            div = document.querySelectorAll('.omit-div-question')
        } else if (col.title === '项目进展状态') {
            div = document.querySelectorAll('.omit-div-status')
        }

        // 如果找到了对应的 div，更新其宽度
        if (div.length > 0) {
            div.forEach(item => {
                item.style.width = `${width}px`
            })
            overStyle.value.maxWidth = `${width}px` // 更新 tooltip 最大宽度
        }

        // 更新 columnState 中的列宽
        columnState.baseColumns = columnState.baseColumns.map(item => {
            if (item.dataIndex === col.dataIndex) {
                return { ...item, width: w } // 更新该列的宽度
            }
            return item
        })

        // 如果列有子列，确保子列也能根据父列的宽度进行更新
        if (col.children) {
            col.children.forEach(child => {
                columnState.baseColumns = columnState.baseColumns.map(item => {
                    if (item.dataIndex === child.dataIndex) {
                        return { ...item, width: w } // 更新子列的宽度
                    }
                    return item
                })
            })
        }
    }
    const currentGdData = ref({})
    async function showGd(record, item) {
        currentGdData.value = item
        convertId.value = record.id
        await getProjectList() // 获取项目列表
        await getEnvironmentList() // 获取环境列表
        await getCustomerList() // 获取客户列表
        await getProductList() // 获取产品列表
        gdState.visible = true
        nextTick(() => {
            initTitle()
            const data = cloneDeep(record)
            gdState.modalForm.areaCode = data.areaCode
            gdState.modalForm.content = data.questionDescription
            if (data.endTime) {
                gdState.modalForm.endTime = dayjs(data.endTime).format('YYYY-MM-DD HH:mm:ss')
            }
            gdState.modalForm.projectId = data.projectId
            quillEditor.value.setText(data.questionDescription + data.solutionOrAction)
        })
    }
    // 项目
    function getProjectList() {
        if (gdState.modalForm.areaCode) {
            get(`/solution-ppm-work-order/api/v1/work_order/project_by_area_code/${gdState.modalForm.areaCode}`).then(
                data => {
                    if (data.code !== 200) {
                        message.error(data.message)
                        return
                    }
                    gdState.projectList = data.data
                }
            )
        } else {
            get(`/solution-ppm-work-order/api/v1/work_order/project_by_area_code/0`).then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                gdState.projectList = data.data
            })
        }
    }
    function getCustomerList() {
        get(
            `/solution-ppm-work-order/api/v1/work_order/customer?areaCode=${
                gdState.modalForm.areaCode ? gdState.modalForm.areaCode : ''
            }`
        ).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            gdState.customList = data.data
        })
    }
    // 产品
    function getProductList() {
        let envId = gdState.environmentList.find(item => item.name === gdState.modalForm.environment)?.id
        get(`/solution-ppm-work-order/api/v1/work_order/product?envId=${envId ? envId : ''}`).then(data => {
            gdState.productList = data.data
        })
    }
    // 获取环境
    function getEnvironmentList() {
        let customerId = gdState.customList.find(item => item.name === gdState.modalForm.customer)?.id
        get(`/solution-ppm-work-order/api/v1/work_order/env?customerId=${customerId ? customerId : ''}`).then(data => {
            gdState.environmentList = data.data
        })
    }
    const editData = ref({})
    function confirmLhwt(record, father, itemBody) {
        editData.value = record

        finallyConfirmLhwt(record, father, itemBody)
    }
    function noSaveData() {
        message.info('已取消编辑！')
        lhwtState.validateVisible = false
        getMeetData()
    }
    function finallyConfirmLhwt(record, father, itemBody) {
        const expandedId = father
        record.okBtnLoading = true
        lhwtState.tipLoading = true
        const api = editData.value.isNew ? post : put
        api('/solution-ppm/api/v2/built-in-system-ppm/meeting_question', {
            ...editData.value,
            meetingMinutesId: father
        })
            .then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                message.success(data.message)
                if (editData.value.isNew) {
                    // 新建数据的情况
                    const index = itemBody.meetingQuestionList.findIndex(item => item === record)
                    if (index !== -1) {
                        // 用后端返回的数据替换临时数据
                        itemBody.meetingQuestionList.splice(index, 1, {
                            ...data.data,
                            isEdit: false
                        })
                    }
                } else {
                    // 编辑现有数据的情况
                    Object.assign(record, data.data, { isEdit: false })
                }
                lhwtState.validateVisible = false
                record.isEdit = false
            })
            .finally(() => {
                editData.value = {}
                record.okBtnLoading = false
                lhwtState.tipLoading = false
            })
    }
    function handleEdit(record) {
        record.editLoading = true
        put(`/solution-ppm/api/v2/built-in-system-ppm/meeting_question/modify_lock/${record.id} `)
            .then(async data => {
                if (data.code !== 200) {
                    message.error('有人正在操作')
                    return
                }

                await getFactory(record)
                await getProjectNameList(record)
                record.isEdit = true
            })
            .finally(() => {
                record.editLoading = false
            })
    }
    function getFactory(record) {
        get(
            `/solution-ppm/api/v2/built-in-system-ppm/meeting_question/get_project_by_area_code/${record.areaCode}`
        ).then(data => {
            lhwtState.projectList = data.data.map(item => {
                return {
                    label: item.projectShortName,
                    value: item.projectId,
                    pmName: item.pmName,
                    projectDirector: item.projectDirector,
                    pmo: item.projectManagementOffice
                }
            })
        })
    }
    function getProjectNameList() {
        get(`/solution-ppm/api/v2/built-in-system-ppm/meeting_question/get_platform_project`).then(data => {
            lhwtState.projectNameList = data.data.map(item => {
                return {
                    label: item.projectName,
                    value: item.id
                }
            })
        })
    }
    function confirmDeleteLhwt(record, id, index, itemId) {
        if (!lhwtState.permission) {
            message.info('暂无权限')
            return
        }
        if (record.isNew) {
            mettingState.dataSource[index].meetingQuestionList.shift()
        } else {
            del(`/solution-ppm/api/v2/built-in-system-ppm/meeting_question/${id}`).then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                message.success(data.message)
                const expandedId = itemId
                getMeetData().then(() => {
                    // 数据获取完成后，恢复展开状态
                    const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                    if (foundItem) {
                        foundItem.expand = true
                    }
                })
            })
        }
    }
    function confirmDeleteLhwtModal() {
        mettingState.modalForm.actionList.shift()
    }
    const gdFormRef = ref(null)
    //     转化为FAQ
    const faqState = reactive({
        createVisible: false,
        pzLoading: false,
        // 选择问题数据源
        questionList: [],
        createList: {
            'problemName': undefined,
            'scene': undefined,
            'stageNames': undefined,
            'labels': undefined,
            'questionId': undefined,
            'answerStr': undefined
        }
    })
    const expandItem = ref()
    function showFaq(item, record) {
        convertId.value = record.id
        expandItem.value = item.id
        getQuestionList()
        faqState.createVisible = true
        faqState.createList.problemName = record.questionDescription
        nextTick(() => {
            nextTick(() => {
                const editor = answerQuillEditor.value
                const content = record.solutionOrAction

                let delta

                // 尝试解析成 JSON
                if (typeof content === 'string') {
                    try {
                        const parsed = JSON.parse(content)
                        // 判断是不是合法的 Delta 格式
                        if (parsed && typeof parsed === 'object' && Array.isArray(parsed.ops)) {
                            delta = parsed
                        }
                    } catch (e) {
                        // 不是 JSON，继续走后面的纯文本逻辑
                    }
                }

                if (delta) {
                    // 是合法 Delta，直接设置
                    editor.setContents(delta)
                } else {
                    // 清空编辑器内容，插入纯文本
                    editor.setText(typeof content === 'string' ? content : String(content || ''))
                }
            })
        })
    }
    function getQuestionList() {
        post('/solution-ppm/api/v2/built-in-system-ppm/qa/question/search', { stageNames: undefined }).then(data => {
            faqState.questionList = data.data.map(item => {
                return {
                    label: item.problemName,
                    value: item.id,
                    stageNames: item.stageNames,
                    labels: item.labels
                }
            })
        })
    }
    const currentQuestion = ref({})
    const questionRef = ref(null)
    function confirmQuestion() {
        questionRef.value.validate().then(async () => {
            faqState.pzLoading = true
            // 富文本
            const deltaContent = answerQuillEditor.value.getContents()

            const imageUploadPromises = []

            deltaContent.ops.forEach(op => {
                if (op.insert && op.insert.image && op.insert.image.startsWith('data:')) {
                    const localSrc = op.insert.image

                    // 如果是 base64 图片，上传并替换为 URL
                    const file = dataURLtoFile(localSrc, 'image.png') // 将 base64 转换为 File 对象

                    const uploadPromise = uploadFileAPI(file).then(({ data: { fullUrl } }) => {
                        // 替换 op 中的 base64 URL 为服务器返回的 URL
                        op.insert.image = fullUrl
                    })

                    imageUploadPromises.push(uploadPromise)
                }
            })
            try {
                await Promise.all(imageUploadPromises)
                const params = cloneDeep(faqState.createList)
                params.answerStr = JSON.stringify(deltaContent)
                post(
                    `/solution-ppm/api/v2/built-in-system-ppm/meeting_question/transfer_to_faq/${convertId.value} `,
                    params
                )
                    .then(data => {
                        if (data.code !== 200) {
                            message.error(data.message)
                            return
                        }
                        message.success(data.message)
                        faqState.createVisible = false
                        currentQuestion.value = {}
                        const expandedId = expandItem.value
                        // 先获取数据
                        getMeetData().then(() => {
                            // 数据获取完成后，恢复展开状态
                            const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                            if (foundItem) {
                                foundItem.expand = true
                            }
                        })
                        resetAllForm()
                    })
                    .finally(() => {
                        faqState.pzLoading = false
                    })
            } catch (error) {
                console.error('图片上传失败', error)
                return // 终止提交
            }
        })
    }

    function cancalQuestion() {
        faqState.createVisible = false
        resetAllForm()
    }
    function resetAllForm() {
        faqState.createList = {
            'problemName': undefined,
            'scene': undefined,
            'stageNames': undefined,
            'labels': undefined,
            'questionId': undefined,
            'answerStr': undefined
        }
        currentQuestion.value = {}
        expandItem.value = {}
    }
    function questionChange() {
        if (faqState.createList.questionId) {
            let result = faqState.questionList.find(item => item.value === faqState.createList.questionId)
            if (result) {
                faqState.createList.stageNames = result.stageNames
                faqState.createList.labels = result.labels
                faqState.createList.problemName = result.label
            }
        } else {
            faqState.createList.stageNames = ''
            faqState.createList.labels = ''
            faqState.createList.problemName = undefined
        }
    }
    function getClassFy() {
        get('/solution-ppm/api/v2/built-in-system-ppm/task/faq/v2/classify/search').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            twoState.classFyList = data.data.map(item => {
                return {
                    label: item.problemClassifyName,
                    value: item.problemClassifyNo
                }
            })
            faqState.questionList = data.data
        })
    }
    // 区域
    function getAreaList() {
        get('/solution-ppm-work-order/api/v1/work_order/area_info').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            lhwtState.areaNameList = data.data.map(item => {
                return {
                    label: item.areaName,
                    value: item.areaCode
                }
            })
            lhwtState.areaNameList.unshift({ label: '全部', value: '全部' })
        })
    } // 工单区域
    // 区域
    function getGdAreaList() {
        get('/solution-ppm-work-order/api/v1/work_order/area_info').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            gdState.areaList = data.data.map(item => {
                return {
                    label: item.areaName,
                    value: item.areaCode
                }
            })
        })
    }
    async function getBaseList() {
        // 定义请求接口的 URL 或方法
        const requests = [
            get(' /solution-ppm-basic-data/api/v1/dictionary/search_tree/LHWTKB.WTLX'), // 问题类型
            get(' /solution-ppm-basic-data/api/v1/dictionary/search/LHWTKB.JJFA'), // 解决方案
            get(' /solution-ppm-basic-data/api/v1/dictionary/search/LHWTKB.FAQ'), // faq
            get(' /solution-ppm-basic-data/api/v1/dictionary/search/LHWTKB.TXBH') // 体系闭环
        ]

        try {
            // 使用 Promise.allSettled 确保所有请求都会执行
            const results = await Promise.allSettled(requests)

            // 处理每个请求的结果
            results.forEach((result, index) => {
                if (result.status === 'fulfilled') {
                    if (index === 0) {
                        lhwtState.wtlxList = result.value.data
                    } else if (index === 1) {
                        lhwtState.jjfaList = result.value.data.map(item => {
                            return {
                                label: item.itemName,
                                value: item.itemName
                            }
                        })
                    } else if (index === 2) {
                        lhwtState.faqList = result.value.data.map(item => {
                            return {
                                label: item.itemName,
                                value: item.itemName
                            }
                        })
                    } else if (index === 3) {
                        lhwtState.txbhList = result.value.data.map(item => {
                            return {
                                label: item.itemName,
                                value: item.itemName
                            }
                        })
                    }
                } else {
                    // 请求失败，打印错误
                    console.error(`接口 ${index + 1} 请求失败:`, result.reason)
                }
            })
        } catch (error) {
            // 捕获任何其他的错误（比如请求数组外的错误）
            console.error('请求出现意外错误:', error)
        }
    }

    function getLhwtAllUser() {
        get('/solution-ppm/api/v2/built-in-system-ppm/pmgf/get/allUser').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            lhwtState.allUser = data.data.userDtoList
        })
    }
    function getGroup() {
        get('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/participant').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            lhwtState.userGroup = data.data
        })
    }
    function getPermission() {
        get('/solution-ppm/api/v2/built-in-system-ppm/meeting_question/permission').then(data => {
            lhwtState.permission = data.data
        })
    }
    const twoState = reactive({
        ClassFyList: [],
        questionList: []
    })

    const taskList = ref([])

    function getTaskList() {
        get('/solution-ppm/api/v2/built-in-system-ppm/task/faq/v2/project_stage').then(data => {
            // if (data.code !== 200) {
            taskList.value = data.data.map(item => {
                return {
                    label: item.stageName,
                    value: item.stageName
                }
            })
            // }
        })
    }
    function projectTypeChange(record) {
        if (record.projectType === '交付项目') {
            record.projectId = undefined
        } else if (record.projectType === '平台项目') {
            record.projectId = undefined
            record.areaCode = undefined
            record.projectDirector = undefined
            record.pmName = undefined
        }
        if (!record.projectType) {
            record.projectId = undefined
            record.areaCode = undefined
            record.projectDirector = undefined
            record.pmName = undefined
        }
    }
    function modalProjectTypeChange(index) {
        if (mettingState.modalForm.actionList[index].projectType === '交付项目') {
            mettingState.modalForm.actionList[index].projectId = undefined
        } else if (mettingState.modalForm.actionList[index].projectType === '平台项目') {
            mettingState.modalForm.actionList[index].projectId = undefined
            mettingState.modalForm.actionList[index].areaCode = undefined
            mettingState.modalForm.actionList[index].projectDirector = undefined
            mettingState.modalForm.actionList[index].pmName = undefined
        }
        if (!mettingState.modalForm.actionList[index].projectType) {
            mettingState.modalForm.actionList[index].projectId = undefined
            mettingState.modalForm.actionList[index].areaCode = undefined
            mettingState.modalForm.actionList[index].projectDirector = undefined
            mettingState.modalForm.actionList[index].pmName = undefined
            mettingState.modalForm.actionList[index].pmo = undefined
        }
    }
    function modalProjectIdChange(index) {
        if (mettingState.modalForm.actionList[index].projectType === '交付项目') {
            mettingState.modalForm.actionList[index].projectId = undefined
        } else if (mettingState.modalForm.actionList[index].projectType === '平台项目') {
            mettingState.modalForm.actionList[index].projectId = undefined
            mettingState.modalForm.actionList[index].areaCode = undefined
            mettingState.modalForm.actionList[index].projectDirector = undefined
            mettingState.modalForm.actionList[index].pmName = undefined
        }
    }
    function handlerGetSpace(data) {
        return data ? data?.split(/[,，;；\n]/).map(item => item.trim()) : []
    }
    function getHtmlContent(delta) {
        if (!delta) {
            return ''
        }
        const quill = new Quill(document.createElement('div'))
        quill.setContents(JSON.parse(delta))

        // 替换换行符为 <br>，确保 v-html 能正确换行
        return quill.root.innerHTML.replace(/\n/g, '<br>')
    }
    // 获取风险类型
    function getFxLx() {
        get(' /solution-ppm-basic-data/api/v1/dictionary/search/FXLX').then(data => {
            lhwtState.fxlxList = data.data
        })
    }
    // 获取标签
    function getLabelList() {
        get('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/labels').then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            lhwtState.labelsList = data.data.map(item => {
                return {
                    id: item.id,
                    name: item.label,
                    checked: false
                }
            })
        })
    }
    // 播放视频
    import TCPlayer from 'tcplayer.js'
    import 'tcplayer.js/dist/tcplayer.min.css'
    const player = ref(null)
    const pxState = reactive({
        videoVisble: false,
        videoSrc: undefined
    })
    function showVideo(record) {
        pxState.videoVisble = true
        pxState.videoSrc = record
        nextTick(() => {
            localStorage.setItem('ghostWatermarkFirstShow', 0)
            let userInfo = localStorage.getItem('al__USER_INFO')
            let userName = JSON.parse(userInfo).value.name
            player.value = TCPlayer('video01', {
                sources: [
                    {
                        src: pxState.videoSrc // 播放地址
                    }
                ],
                licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1309773370_1/v_cube.license', // license 地址，参考准备工作部分，在视立方控制台申请 license 后可获得 licenseUrl
                plugins: {
                    DynamicWatermark: {
                        //
                        type: 'text',
                        speed: 0.3, // 建议取值范围 0<= speed <=1，默认值 0.2
                        content: `研究院版权所有（${userName}正在播放）`, // 添加换行符
                        opacity: 0.5,
                        fontSize: '12px', // type === text 时有效, 其余字段通用
                        color: '#FFFFFF'
                    }
                }
            })
        })
    }
    function closeVideo() {
        player.value?.dispose()
        pxState.videoVisble = false // 关闭弹窗
    }
    //     工单提交
    //     父工单提交表单
    function submit() {
        gdFormRef.value.validate().then(async () => {
            gdState.fatherLoading = true
            const deltaContent = quillEditor.value.getContents()

            const imageUploadPromises = []

            deltaContent.ops.forEach(op => {
                if (op.insert && op.insert.image && op.insert.image.startsWith('data:')) {
                    const localSrc = op.insert.image

                    // 如果是 base64 图片，上传并替换为 URL
                    const file = dataURLtoFile(localSrc, 'image.png') // 将 base64 转换为 File 对象

                    const uploadPromise = uploadFileAPI(file).then(({ data: { fullUrl } }) => {
                        // 替换 op 中的 base64 URL 为服务器返回的 URL
                        op.insert.image = fullUrl
                    })

                    imageUploadPromises.push(uploadPromise)
                }
            })
            try {
                await Promise.all(imageUploadPromises)
                // 新建保存逻辑
                const params = { ...gdState.modalForm }
                params.description = JSON.stringify(deltaContent)
                post(
                    `/solution-ppm/api/v2/built-in-system-ppm/meeting_question/transfer_to_work_order/${convertId.value}`,
                    params
                )
                    .then(data => {
                        if (data.code !== 200) {
                            message.error(data.message)
                            return
                        }
                        message.success(data.message)
                        gdState.visible = false
                        resetFather()
                        const expandedId = currentGdData.value.id
                        getMeetData().then(() => {
                            // 数据获取完成后，恢复展开状态
                            const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                            if (foundItem) {
                                foundItem.expand = true
                            }
                        })
                    })
                    .finally(() => {
                        gdState.fatherLoading = false
                    })
            } catch (error) {
                gdState.fatherLoading = false
                console.error('图片上传失败', error)
                return // 终止提交
            }
        })
    }
    function resetFather() {
        gdState.modalForm = {
            content: undefined,
            type: '问题转化',
            priority: undefined,
            questionSource: '问题转化',
            workHours: undefined,
            endTime: undefined,
            areaCode: undefined,
            projectId: undefined,
            version: undefined,
            customer: undefined,
            production: undefined,
            environment: undefined,
            description: undefined,
            solverList: [],
            descriptionAttachmentList: [],
            qillData: ''
        }
    }
    function fatherCancel() {
        gdState.visible = false
        resetFather()
    }
    function hanldeTypeChange() {
        if (gdState.modalForm.type === '产品需求') {
            gdState.modalForm.priority = 'p3'
            getSolveTimeByType('p3')
        } else {
            gdState.modalForm.priority = gdState.modalForm.endTime = gdState.modalForm.workHours = undefined
        }
    }
    //     根据类型获取解决时间
    function getSolveTimeByType(type) {
        let num = 0
        if (type == 'p0') {
            num = 2
            gdState.modalForm.workHours = 2
        } else if (type == 'p1') {
            num = 24
            gdState.modalForm.workHours = 24
        } else if (type == 'p2') {
            num = 48
            gdState.modalForm.workHours = 48
        } else if (type == 'p3') {
            num = 48
            gdState.modalForm.workHours = 336
        }
        getSolveTime()
    }
    //     计算解决时间
    function getSolveTime() {
        return
        // 获取当前时间
        let currentDate = dayjs()
        let num = gdState.modalForm.workHours
        // 计算新时间
        let newDate = currentDate.add(num, 'hour')

        // 格式化新时间为 "YYYY-MM-DD HH:mm" 格式
        let formattedDate = newDate.format('YYYY-MM-DD HH:mm:ss')

        gdState.modalForm.endTime = formattedDate
    }
    // 区域变
    function gdAreaChange() {
        gdState.modalForm.customer =
            gdState.modalForm.projectId =
            gdState.modalForm.environment =
            gdState.modalForm.production =
            gdState.modalForm.version =
            gdState.modalForm.milepostId =
            gdState.modalForm.taskId =
                undefined
    }
    // 客户改变如果没有选区域自动带区域
    function customerChange() {
        let arae = gdState.customList.find(item => item.name === gdState.modalForm.customer)
        if (arae) {
            gdState.modalForm.areaCode = arae.areaCode
        }
        gdState.modalForm.environment = undefined
    }
    // 环境变
    function environmentChange() {
        gdState.modalForm.production = gdState.modalForm.version = undefined
    }
    // 项目变
    function projectChange() {
        gdState.modalForm.environment =
            gdState.modalForm.production =
            gdState.modalForm.version =
            gdState.modalForm.milepostId =
            gdState.modalForm.taskId =
                undefined
    }
    // 产品变
    function productChange() {
        gdState.modalForm.version = undefined
        getVersionList()
    }
    // 获取版本
    function getVersionList() {
        let envId = gdState.environmentList.find(item => item.name === gdState.modalForm.environment)?.id
        let productId = gdState.productList.find(item => item.name === gdState.modalForm.production)?.id
        get(
            `/solution-ppm-work-order/api/v1/work_order/version?envId=${envId ? envId : ''}&productId=${
                productId ? productId : ''
            }`
        ).then(data => {
            gdState.modalForm.version = data.data
        })
    }
    // 父上传文件
    function handlerFatherUpload(file) {
        gdState.fatherLoading = true
        const data = new FormData()
        data.append('file', file)

        post('/file-storage/api/v1/file/upload', data)
            .then(({ data: { fullUrl } }) => {
                if (data) {
                    // 新文件对象
                    const newFile = {
                        uid: file.uid,
                        lastModified: file.lastModified,
                        name: file.name,
                        size: file.size,
                        type: file.type,
                        status: 'done',
                        url: fullUrl
                    }

                    // 去重，保留一个副本
                    gdState.modalForm.descriptionAttachmentList = [
                        // 保留已存在文件（去除重复）
                        ...gdState.modalForm.descriptionAttachmentList.filter(
                            item => item.uid !== file.uid && item.name !== file.name
                        ),
                        // 添加新的文件
                        newFile
                    ]
                }
                gdState.fatherLoading = false
            })
            .catch(e => {
                message.error('上传失败' + e)
            })

        return false
    }
    // 父移除文件
    function handlerFatherRemove(file) {
        gdState.modalForm.descriptionAttachmentList = gdState.modalForm.descriptionAttachmentList.filter(
            item => item.uid !== file.uid
        )
    }
    // 父上传文件
    // 区域变
    function areaChange(record) {
        if (record) {
            record.pmName = record.projectDirector = record.projectId = undefined
        } else {
            lhwtState.changeForm.pmName =
                lhwtState.changeForm.projectDirector =
                lhwtState.changeForm.projectId =
                    undefined
        }
    }

    function factoryChange(record) {
        let chooseData = lhwtState.projectList.find(item => item.value === record.projectId)
        if (chooseData) {
            if (record) {
                record.projectDirector = chooseData.projectDirector?.split(',')[0]
                record.pmName = chooseData.pmName
                record.pmo = chooseData.pmo
            } else {
                lhwtState.changeForm.projectDirector = chooseData.projectDirector?.split(',')[0]
                lhwtState.changeForm.pmName = chooseData.pmName
                lhwtState.changeForm.pmo = chooseData.pmo
            }
        }
    }

    const pageSizeChange = (current, size) => {
        pagination.value.current = current
        pagination.value.pageSize = size
        getMeetData()
    }
    const pageChange = (page, pageSize) => {
        pagination.value.current = page
        pagination.value.pageSize = pageSize
        getMeetData()
    }
    const pagination = ref({
        current: 1,
        pageSize: 10,
        total: 0,
        pageSizeOptions: ['20', '40', '60', '80', '100'],
        showTotal: total =>
            `共 ${total} 个项目 第 ${pagination.value.current}/${Math.ceil(total / pagination.value.pageSize)}页`
    })
    //     新需求
    function toggleCollapse(item) {
        item.expand = !item.expand
    }
    function confirmHiddenLhwt(item, id) {
        // 记录当前展开的 item ID

        put(`/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/unbind/${id}`).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            message.success(data.message)
            const expandedId = item.id
            // 先获取数据
            getMeetData().then(() => {
                // 数据获取完成后，恢复展开状态
                const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                if (foundItem) {
                    foundItem.expand = true
                }
            })
        })
    }

    const secondState = reactive({
        editVisible: false,
        dateTime: '',
        tableData: [],
        checkList: [],
        checkLoading: false
    })
    const currentRecordData = ref({})
    // 问题维护

    function handleConfirmCheck() {
        secondState.checkLoading = true
        put(
            `/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/problem_maintenance/${currentRecordData.value.id}`,
            secondState.checkList
        )
            .then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                message.success(data.message)
                cancelCheck()
                getMeetData()
            })
            .finally(() => {
                secondState.checkLoading = false
            })
    }
    function cancelCheck() {
        secondState.editVisible = false
        secondState.checkList = []
    }
    const actionColumns = ref([
        {
            title: '项目类型',
            dataIndex: 'projectType',
            align: 'center',
            ellipsis: true
        },
        {
            title: '区域',
            dataIndex: 'areaName',
            align: 'center',
            ellipsis: true
        },
        {
            title: '项目/工厂名称',
            dataIndex: 'projectShortName',
            align: 'center',
            ellipsis: true
        },
        {
            title: '项目进展状态',
            dataIndex: 'projectProgressStatus',
            align: 'center',
            ellipsis: true
        },
        {
            title: '问题&风险描述',
            dataIndex: 'questionDescription',
            align: 'center',
            ellipsis: true
        },
        {
            title: '解决方案及行动项',
            dataIndex: 'solutionOrAction',
            align: 'center',
            ellipsis: true
        }
    ])
    function getAction(item) {
        currentRecordData.value = item
        secondState.dateTime = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
        post('/solution-ppm/api/v2/built-in-system-ppm/meeting_question/search', {
            timeFrame: secondState.dateTime,
            association: true
        }).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            secondState.tableData = data.data
            secondState.editVisible = true
        })
    }
    function getSelectTable() {
        post('/solution-ppm/api/v2/built-in-system-ppm/meeting_question/search', {
            timeFrame: secondState.dateTime,
            association: true
        }).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            secondState.tableData = data.data
        })
    }
    function selectChange(selectedRowKeys) {
        secondState.checkList = selectedRowKeys
    }
    //     新需求
    // 获取监控场景list
    function getMonitorSceneList(flag) {
        const params = gdState.modalForm.type
        get(` /solution-ppm-basic-data/api/v1/dictionary/search/${params}`).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            gdState.monitorSceneList = data.data.map(item => {
                return {
                    label: item.itemName,
                    value: item.itemCode
                }
            })
        })
    }
    //     列表新建
    const actionItem = {
        meetingDate: dayjs().format('YYYY-MM-DD'),
        solution: undefined,
        questionDescription: undefined,
        responsiblePersonList: undefined,
        endTime: undefined,
        completionStatusFeedback: undefined,
        meetingSourceList: [],
        productLineList: [],
        solutionOrAction: undefined
    }
    function handleAddAction(item, index) {
        mettingState.expandedRowKeys.push(item.id)
        console.log(index, 'index')
        // 定义需要检查的会议类型
        const meetingTypes = ['周例会', '日例会', '专题会', '目标评审会']

        // 找出item.labelList中包含的会议类型
        const matchedTypes = item.labelList.filter(label => meetingTypes.includes(label))

        if (!item.expand) {
            item.expand = true
        }

        // 创建新的actionItem，如果有关联的会议类型就设置meetingSourceList
        const newActionItem = {
            ...actionItem,
            isNew: true,
            isEdit: true,
            questionSource: '会议纪要'
        }

        if (matchedTypes.length > 0) {
            newActionItem.meetingSourceList = [...matchedTypes]
        }
        // 定义需要检查的会议类型
        const cpxTypes = lhwtState.productLineList
        // 找出item.labelList中包含的会议类型
        const cpxSelectList = item.labelList.filter(
            label => cpxTypes.some(t => t.value === label) // 或 t.label === label
        )

        if (cpxSelectList.length > 0) {
            newActionItem.productLineList = [...cpxSelectList]
        }
        mettingState.dataSource[index].meetingQuestionList.unshift(newActionItem)
    }
    function handleAddModalAction(item) {
        // 创建新的actionItem
        const newActionItem = {
            ...actionItem, // 假设actionItem是基础模板
            isNew: true,
            isEdit: true,
            responsiblePersonList: [], // 初始化责任人列表
            questionSource: '会议纪要'
        }
        // 定义需要检查的会议类型
        const meetingTypes = ['周例会', '日例会', '专题会', '目标评审会']

        // 获取当前选中的标签（checked为true的标签）
        const checkedLabels = lhwtState.labelsList.filter(item => item.checked).map(item => item.name)
        // 找出选中的标签中包含的会议类型
        const matchedTypes = checkedLabels.filter(label => meetingTypes.includes(label))
        // 如果有关联的会议类型，设置meetingSourceList
        if (matchedTypes.length > 0) {
            newActionItem.meetingSourceList = [...matchedTypes]
        }
        // 产品线新增
        const cpxTypes = lhwtState.productLineList
        // 找出item.labelList中包含的产品线
        const cpxSelectList = checkedLabels.filter(
            label => cpxTypes.some(t => t.value === label) // 或 t.label === label
        )
        if (cpxSelectList.length > 0) {
            newActionItem.productLineList = [...cpxSelectList]
        }

        // 将新行动项添加到表单的actionList中
        if (!mettingState.modalForm.actionList) {
            mettingState.modalForm.actionList = []
        }
        mettingState.modalForm.actionList.unshift(newActionItem)
    }
    //删除一个模块
    function handleDeleteModalAction(index) {
        mettingState.modalForm.actionList.splice(index, 1)
    }
    const handleDebouncedSearch = debounce(getMeetData, 500)
    function debounce(fn, delay = 300) {
        let timer = null
        return function (...args) {
            if (timer) clearTimeout(timer)
            timer = setTimeout(() => {
                fn.apply(this, args)
            }, delay)
        }
    }
    // 跳工单
    function jumpGd(record) {
        window.open(
            `${import.meta.env.VITE_PUBLIC_PATH}/allin-app/app_3000000079/page/3000001111?number=${
                record.workOrderNumber
            }`,
            '_blank'
        )
    }
    // 点击「取消展示 / 确定」
    function showTableCheck(item, index) {
        mettingState.expandedRowKeys.push(item.id)
        if (!item.showCheckbox) {
            // 开启勾选模式
            item.showCheckbox = true
            item.selectedRowKeys = []
        } else {
            // 确认 → 打印勾选 id，重置
            put(
                `/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/unbind/${item.id}`,
                item.selectedRowKeys
            ).then(data => {
                if (data.code !== 200) {
                    message.error(data.message)
                    return
                }
                message.success(data.message)
                const expandedId = item.id
                // 先获取数据
                getMeetData().then(() => {
                    // 数据获取完成后，恢复展开状态
                    const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                    if (foundItem) {
                        foundItem.expand = true
                    }
                })
                item.showCheckbox = false
                item.selectedRowKeys = []
            })
        }
    }

    // 处理勾选变化
    function onSelectChange(selectedRowKeys, item) {
        item.selectedRowKeys = selectedRowKeys
    }
    //     移动端提醒
    const remindData = ref()
    const remindState = reactive({
        form: {
            participant: false,
            userList: []
        },
        okLoading: false,
        modalVisible: false
    })
    function showRemind(item) {
        remindData.value = cloneDeep(item)
        remindState.modalVisible = true
    }
    const remindRef = ref(null)
    function confirmRemind() {
        remindRef.value.validate().then(() => {
            remindState.okLoading = true
            put('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/notice', {
                ...remindState.form,
                id: remindData.value.id
            })
                .then(data => {
                    if (data.code !== 200) {
                        message.error(data.message)
                        return
                    }
                    message.success(data.message)
                    const expandedId = remindData.value.id
                    cancelRemind()
                    getMeetData().then(() => {
                        // 数据获取完成后，恢复展开状态
                        const foundItem = mettingState.dataSource.find(i => i.id == expandedId)
                        if (foundItem) {
                            foundItem.expand = true
                        }
                    })
                })
                .finally(() => {
                    remindState.okLoading = false
                })
        })
    }
    function cancelRemind() {
        remindState.form.participant = false
        remindState.form.userList = []
        remindState.modalVisible = false
        remindData.value = {}
    }
    const colorMap = {
        '解决中': '#3875FF',
        '未转化': '#9254DE',
        '未开始': '#BBBBBB',
        '已解决': '#52C41A',
        '处理中': '#3875ff',
        '已完成': '#52C41A',
        '延期解决': '#FF7400',
        '无需解决': '#FFC900',
        '已关闭': '#898989',
        '已回访': '#3FA7FF',
        '待分发': '#FF7D27',
        '进行中': '#3875FF',
        '审批中': '#1890FF',
        '未启动': '#BBBBBB',
        '完成': '#52C41A',
        '延期完成': '#FA8C16',
        '测试中': '#A0D911',
        '延期': '#FA3D16',
        '提测': '#A0D911',
        '验收': '#9254DE'
    }
    function getTextColor(text) {
        return colorMap[text] || '#262626'
    }
    // 会议类型
    function getHyly() {
        get(' /solution-ppm-basic-data/api/v1/dictionary/search/LHWTKB.HYLY').then(data => {
            lhwtState.hylyList = data.data
        })
    }
    //     转任务=========================================================================================================================
    const selectHolder = '请选择'
    const inputHolder = '请输入'
    onMounted(() => {
        getProjectTree()
        const userInfoStorage = localStorage.getItem('al__USER_INFO')
        taskLeader.value = JSON.parse(userInfoStorage)
    })

    const taskPeopleList = ref([])
    function getPopleList() {
        if (!taskState.otherTaskForm.taskList[0].projectId) {
            return
        }
        post(
            `/solution-ppm/api/v2/built-in-system-ppm/task/getTopUser/${taskState.otherTaskForm.taskList[0].projectId}`
        ).then(data => {
            taskPeopleList.value = data.data.map(item => {
                return {
                    label: item,
                    value: item
                }
            })
        })
    }
    const taskLeader = ref({})
    const taskState = reactive({
        storyList: [],
        projectTree: [],
        current: 1,
        otherTaskVisible: false,
        otherTaskTitle: '',
        otherOkLoading: false,
        otherTaskForm: {
            taskList: [
                {
                    taskParticipantList: [],
                    allTile: [],
                    startTime: undefined,
                    endTime: undefined,
                    taskName: undefined,
                    workingHours: undefined,
                    taskOwner: taskLeader.value.name,
                    assessorName: taskLeader.value.name,
                    parentId: undefined,
                    storyId: undefined,
                    sopTaskList: []
                }
            ]
        }
    })
    const useProjectId = ref()
    const currentOtherTask = ref({})
    function handleAddSonTask(record, expendId) {
        useProjectId.value = record.projectId
        if (useProjectId.value) {
            let project = taskState.projectTree.find(item => item.projectId === useProjectId.value)
            if (project) {
                project.disabled = true
                taskState.projectTree = [project]
            }
        } else {
            getProjectTree()
        }
        taskState.otherTaskVisible = true
        taskState.otherTaskForm = {
            taskList: [
                {
                    taskParticipantList: [],
                    allTile: [],
                    startTime: undefined,
                    endTime: undefined,
                    taskName: undefined,
                    workingHours: undefined,
                    taskOwner: taskLeader.value.name,
                    assessorName: taskLeader.value.name,
                    parentId: undefined,
                    storyId: undefined,
                    taskId: undefined,
                    description: undefined,
                    sopTaskList: []
                }
            ]
        }
        currentOtherTask.value = { ...record, expendId: expendId }
        taskState.otherTaskTitle = '转任务'
    }
    watch(
        () => taskState.otherTaskForm.taskList.map(item => item.storyId),
        (newList, oldList) => {
            newList.forEach((storyId, index) => {
                // 只有当 storyId 有值并且与旧值不一致时才触发
                if (storyId && storyId !== oldList?.[index]) {
                    taskState.otherTaskForm.taskList[index].parentId = undefined
                    get(`/solution-ppm/api/v2/built-in-system-ppm/v3/platform_task/get_sop_task/${storyId}`).then(
                        data => {
                            taskState.otherTaskForm.taskList[index].sopTaskList = data.data || []
                        }
                    )
                }
            })
        },
        { deep: true, immediate: false }
    )
    const validatePriority = (rule, value) => {
        if (value === undefined || value === null || value === '') {
            return Promise.reject(new Error('请输入优先级'))
        }
        const number = Number(value)
        const isValid = number > 0 && number < 100 && /^(\d{1,2})(\.\d)?$/.test(value.toString())
        return isValid ? Promise.resolve() : Promise.reject(new Error('请输入 1 到 99 之间，最多一位小数的正数'))
    }
    // 获取用户故事
    function getStory() {
        post('/solution-ppm/api/v2/built-in-system-ppm/project/story/search', {
            projectId: taskState.otherTaskForm.taskList[0].projectId
        }).then(data => {
            taskState.storyList = data.data.map(item => {
                return {
                    label: item.storyName,
                    value: item.id
                }
            })
        })
    }
    function disableParentNodes(tree) {
        return tree.map(node => {
            if (node.children && node.children.length > 0) {
                return {
                    ...node,
                    disabled: true, // 父节点禁用
                    children: disableParentNodes(node.children)
                }
            } else {
                return {
                    ...node,
                    disabled: false // 叶子节点可选
                }
            }
        })
    }
    function getProjectTree() {
        post('/solution-ppm/api/v2/built-in-system-ppm/v2/platform/project/tree', {}).then(data => {
            taskState.projectTree = disableParentNodes(data.data)
        })
    }
    function handlerAddOtherPeople(name, index) {
        if (taskState.otherTaskForm.taskList[index].taskParticipantList.indexOf(name) !== -1) {
            taskState.otherTaskForm.taskList[index].taskParticipantList = taskState.otherTaskForm.taskList[
                index
            ].taskParticipantList.filter(item => item !== name)
        } else {
            taskState.otherTaskForm.taskList[index].taskParticipantList.push(name)
        }
    }
    const ptOtherRef = ref(null)
    // 保存其他任务
    function confirmOtherMb() {
        ptOtherRef.value.validate().then(() => {
            taskState.otherOkLoading = true

            //   新建
            taskState.otherTaskForm.taskList.forEach(item => {
                item.startTime = item.allTime[0]
                item.endTime = item.allTime[1]
            })
            post(
                `/solution-ppm/api/v2/built-in-system-ppm/meeting_question/transfer_to_task/${currentOtherTask.value.id}`,
                {
                    dataList: taskState.otherTaskForm.taskList
                }
            )
                .then(data => {
                    if (data.code !== 200) {
                        message.error(data.message)
                        return
                    }
                    message.success(data.message)

                    cancelOtherMb()
                    const expandedId = currentOtherTask.value.id
                    getMeetData().then(() => {
                        // 数据获取完成后，恢复展开状态
                        const foundItem = mettingState.dataSource.find(i => i.id === expandedId)
                        if (foundItem) {
                            foundItem.expand = true
                        }
                    })
                })
                .finally(() => {
                    taskState.otherOkLoading = false
                })
        })
    }
    const PromiseProxy = Promise
    // 关闭其他任务新建
    function cancelOtherMb() {
        taskState.otherTaskVisible = false
        taskState.otherTaskForm = {
            taskList: [
                {
                    taskParticipantList: [],
                    allTile: [],
                    startTime: undefined,
                    endTime: undefined,
                    taskName: undefined,
                    workingHours: undefined,
                    taskOwner: taskLeader.value.name,
                    assessorName: taskLeader.value.name,
                    parentId: undefined,
                    storyId: undefined,
                    taskId: undefined,
                    description: undefined,
                    sopTaskList: []
                }
            ]
        }
        currentOtherTask.value = {}
    }
    //     转任务
    // 对比
    import DiffContent from './Page3000001075.vue'
    const diffState = reactive({
        diffVisible: false,
        orginVisible: false,
        orginText: false,
        oldSummary: '',
        newSummary: '',
        oldMeetingName: '',
        newMeetingName: ''
    })
    function showDiff(item) {
        get(`/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/${item.id}/compare/search`).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            diffState.oldSummary = data.data.beforeMeeting.summary || ''
            diffState.newSummary = data.data.afterMeeting.summary
            diffState.oldMeetingName = data.data.beforeMeeting.meetingName || ''
            diffState.newMeetingName = data.data.afterMeeting.meetingName
            diffState.diffVisible = true
        })
    }
    function showOrginText(item) {
        if (!item.originalText) {
            message.info('暂无原文本')
            return
        }
        diffState.orginText = item.originalText
        diffState.orginVisible = true
    }
    // 产品线
    function getProductLineList() {
        get('/solution-ppm-basic-data/api/v1/product_line/all').then(data => {
            lhwtState.productLineList = data.data.map(item => {
                return {
                    label: item.productLineName,
                    value: item.productLineName
                }
            })
        })
    }
    // 显示设置
    const viewType = ref('卡片展示')
    const columns = ref([
        {
            title: '会议主题',
            dataIndex: 'meetingName',
            align: 'center',
            ellipsis: true,
            resizable: true,
            fixed: 'left'
        },
        {
            title: '会议时间',
            dataIndex: 'meetingDate',
            align: 'center',
            ellipsis: true,
            resizable: true
        },
        {
            title: '记录人',
            dataIndex: 'recorder',
            resizable: true,
            align: 'center',
            ellipsis: true
        },
        {
            title: '行动项完成进展',
            dataIndex: 'progress',
            resizable: true,
            align: 'center',
            ellipsis: true
        },
        {
            title: '会议总结',
            dataIndex: 'summary',
            align: 'center',
            resizable: true,
            ellipsis: true
        },
        {
            title: '参会人',
            dataIndex: 'participants',
            align: 'center',
            resizable: true,
            ellipsis: true
        },
        {
            title: '外部参会人',
            dataIndex: 'outParticipants',
            align: 'center',
            resizable: true,
            ellipsis: true,
            width: 150
        },
        {
            title: '会议附件',
            dataIndex: 'enclosureDtoList',
            align: 'center',
            resizable: true,
            ellipsis: true,
            width: 200
        },
        {
            title: '视频链接',
            dataIndex: 'videoLinks',
            align: 'center',
            resizable: true,
            ellipsis: true,
            width: 200
        },
        {
            title: '操作',
            dataIndex: 'fatherOpration',
            align: 'center',
            resizable: true,
            ellipsis: true,
            width: 330
        }
    ])
    function handleResizeStoryColumn(w, col) {
        col.width = w
    }
    // 判断是否已全部展开
    const isAllExpanded = computed(() => mettingState.expandedRowKeys.length === mettingState.dataSource.length)
    const expendSping = ref(false)
    // 切换展开/收起全部
    const toggleExpandAll = () => {
        expendSping.value = true
        if (isAllExpanded.value) {
            mettingState.expandedRowKeys = [] // 收起
        } else {
            mettingState.expandedRowKeys = mettingState.dataSource.map(item => item.id) // 全部展开
        }
        expendSping.value = false
    }
    // 获取显示设置
    function getViewSetting() {
        get('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/person_config/search/MEET_TABLE_OR_CARD').then(
            data => {
                viewType.value = data.data?.check || '卡片展示'
            }
        )
    }
    // 设置显示设置
    function handleSaveViewSetting() {
        post('/solution-ppm/api/v2/built-in-system-ppm/meeting_minutes/person_config/create', {
            'check': viewType.value,
            'module': 'MEET_TABLE_OR_CARD'
        }).then(data => {
            if (data.code !== 200) {
                message.error(data.message)
                return
            }
            message.success(data.message)
            getMeetData()
        })
    }
</script>
<style lang="less" scoped>
    .page_root {
        width: 100%;
        height: 100%;
        overflow: auto;
    }
    .page_root :deep(.@{ant-prefix}-spin-nested-loading),
    .page_root :deep(.@{ant-prefix}-spin-container) {
        height: 100%;
    }
    .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper) {
        display: flex;
        flex-flow: column nowrap;
        justify-content: flex-start;
    }
    .page_root :deep(.@{ant-prefix}-table) {
        flex: auto;
        overflow: auto;
    }
    .table-moreBtn_down {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        width: 100px;
    }

    .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
        background: #ebf1ff;
    }

    /*  表格树结构样式处理，展开按钮层级增加*/
    :deep(.@{ant-prefix}-table-row-expand-icon) {
        z-index: 1;
    }
    /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
    :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 15px !important;
        width: calc(100% - 15px);
    }
    :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 30px !important;
        width: calc(100% - 30px);
    }
    :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 45px !important;
        width: calc(100% - 45px);
    }
    :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 60px !important;
        width: calc(100% - 60px);
    }

    /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
    :deep(.@{ant-prefix}-transfer-list) {
        height: 100%;
        width: 50%;
    }
    /*会议纪要*/
    .body {
        overflow: hidden;
        height: 100%;
        position: relative;
        .top-search {
            height: 64px;
            margin-bottom: 14px;
            padding: 16px 24px;
            padding-bottom: 10px;
            border-radius: 4px;
            background-color: #fff;
        }

        .summary-boy {
            padding: 16px 24px;
            height: 100%;
            border-radius: 4px;
            background-color: #fff;
            .sop-title {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 16px;

                .sop-title-left {
                    font-size: 16px;
                    color: #262626;
                    letter-spacing: 0;
                    font-weight: 600;
                    line-height: 16px;
                    padding-left: 8px;
                    border-left: 4px solid #3875ff;
                    height: 16px;
                }
            }
            .scroll-div {
                height: calc(100vh - 310px);
                overflow: auto;
                position: relative;
            }
        }
    }
    .add-btn,
    .del {
        background-size: cover;
        width: 16px;
        height: 16px;
        cursor: pointer;
        position: relative;
        top: 10px;
        left: 8px;
    }
    .add-btn {
        background-image: url('http://10.40.0.33:9001/file-storage/493877587527297024-source.png');
    }
    .del {
        background-image: url('http://10.40.0.33:9001/file-storage/493877597704775680-source.png');
    }
    :deep(.ql-editor) {
        min-height: 300px;
        background: #ffffff;
    }
    .meet-item {
        margin: 1px;
        margin-bottom: 16px;
        background: #ffffff;
        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        border: 1px solid #fff;
        .item-title {
            padding: 16px 24px;
            height: 56px;
            background-image: linear-gradient(270deg, rgba(237, 243, 255, 0.5) 0%, #d7e3ff 100%);
            display: flex;
            justify-content: space-between;
            gap: 4px;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            .title-left {
                display: flex;
                align-items: center;
                gap: 8px;
                .title {
                    font-size: 14px;
                    color: #595959;
                    letter-spacing: 0;
                    font-weight: 400;
                }
                .msg {
                    font-size: 16px;
                    color: #262626;
                    letter-spacing: 0;
                    text-align: right;
                    font-weight: 500;
                }
                .time-icon,
                .people-icon,
                .jz-icon {
                    width: 16px;
                    height: 16px;
                    background-size: cover;
                }
                .time-icon {
                    background-image: url('http://10.40.0.33:9001/file-storage/497178195155970048-source.png');
                }
                .people-icon {
                    background-image: url('http://10.40.0.33:9001/file-storage/497178207099250688-source.png');
                    margin-left: 16px;
                }
                .jz-icon {
                    background-image: url('http://10.40.0.33:9001/file-storage/514179853950388224-source.png');
                    margin-left: 16px;
                }
            }
        }
        .item-content {
            padding: 16px 24px;
            .content-row {
                margin-bottom: 16px;
                display: flex;
                flex-wrap: nowrap;
                align-items: center; /* 垂直居中对齐 */
                gap: 16px;
                .box {
                    background: #ffffff;
                    border: 1px solid #d9d9d9;
                    border-radius: 2px;
                    min-height: 32px;
                    padding: 5px 10px;
                    flex: 1; /* 让输入框占满剩余空间 */
                    white-space: pre-wrap; /* 保留换行和缩进 */
                }
                .title {
                    width: 90px;
                    flex: 0 0 auto; /* 不让它伸缩 */
                    white-space: nowrap; /* 防止文字换行 */
                }
            }
        }
    }
    .meet-item:hover {
        border: 1px solid #3875ff;
    }
    .kb-table-box:deep(.@{ant-prefix}-table-thead) > tr > th {
        background: #3875ff;
        color: #fff;
        font-weight: 600;
        padding: 8px 16px;
        border-right: 1px solid #d9d9d9 !important;
        position: relative;
    }
    .kb-table-box :deep(.@{ant-prefix}-table-tbody) tr > td {
        font-size: 14px;
        font-family: arial, helvetica, 'microsoft yahei';
        font-weight: 400;
        color: #262626;
        border-bottom: 1px solid #d9d9d9;
        padding: 8px 16px;
        word-break: break-all;
    }
    .kb-table-box {
        margin-bottom: 6px;
    }
    .modal-div :deep(.ant3-form-item-label) {
        width: 100px;
    }
    .new-modal:deep(.ant3-form-item-label) {
        width: 120px;
    }
    .new-modal {
        width: 100%;
    }
    .modal-div :deep(.ql-snow .ql-editor) img {
        width: 200px;
    }
    .no-data-msg {
        position: absolute;
        top: 61%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #595959;
    }
    .no-data-img {
        width: 66px;
        height: 80px;
        background-image: url('http://10.40.0.33:9001/file-storage/482099304502618112-source.png');
        background-size: cover;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .gd-form-content :deep(.ant3-form-item-label) {
        width: 135px;
    }
    .gd-form-content :deep(.ant3-input-number),
    :deep(.ant3-picker) {
        width: 100%;
    }
    .gd-form-content :deep(.ql-snow .ql-editor) img {
        width: 200px;
    }
    .faq-my-page :deep(.ant3-form-item-label) {
        width: 115px;
    }
    .module-item,
    .module-item-two {
        position: relative;
        width: calc(100% - 60px);
    }
    .module-item-two {
        border-bottom: 1px solid #d9d9d9;
        margin-bottom: 16px;
    }
    .faq-del {
        width: 28px;
        color: #3875ff;
        position: absolute;
        right: 35px;
        top: 5px;
    }
    .faq-add-btn {
        position: absolute;
        right: -35px;
        color: #3875ff;
        top: 5px;
    }
    .validate-content {
        position: relative;
    }
    .validate-icon {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 10px;
        height: 10px;
        background-image: url('http://10.40.0.33:9001/file-storage/492483523888244736-source.png');
        background-size: cover;
    }
    .validate-icon-1 {
        background-image: url('http://10.40.0.33:9001/file-storage/492483523888244736-source.png');
        background-size: cover;
        width: 10px;
        height: 10px;
        position: absolute;
        top: -20px;
    }
    .faq-form-content {
        display: inline-block;
        width: calc(100% - 80px);
    }
    .table-title {
        padding-left: 8px;
        height: 14px;
        border-left: 4px solid #3875ff;
        line-height: 14px;
        font-weight: 600;
        margin-top: 16px;
        margin-bottom: 8px;
        color: #262626;
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        align-items: center;
    }
    .pagination-div {
        position: absolute;
        right: 30px;
        bottom: 0;
        padding: 10px;
        background: transparent; /* 可选：为背景添加颜色 */
    }
    .active-icon {
        color: #3875ff;
        transform: rotate(90deg);
        cursor: pointer;
    }
    .omit-div,
    .omit-div-question,
    .omit-div-productionPlan,
    .omit-div-customerRelationship {
        width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height: 100%;
        padding: 0 8px;
    }
    .togle-div {
        position: absolute;
        right: 0;
        top: 5px;
    }
    .item-icon {
        display: flex;
        flex-wrap: wrap;
        gap: 8px; /* 可选：让 tag 之间有间距 */
    }
    .label-item {
        display: flex;
        background-color: #eeeeee;
        align-items: center;
        padding: 1px 8px;
        ont-size: 14px;
        color: #595959;
        letter-spacing: 0;
        text-align: center;
        font-weight: 400;
        gap: 4px;
        border-radius: 2px;
    }
    .label-img {
        background-image: url('http://10.40.0.33:9001/file-storage/503656902913648640-source.png');
        background-size: cover;
        width: 10px;
        height: 10px;
    }
    .action-title {
        display: flex;
        justify-content: space-between;
        border-left: 4px solid #3875ff;
        padding-left: 8px;
        font-size: 16px;
        color: #262626;
        letter-spacing: 0;
        text-align: right;
        font-weight: 600;
        height: 16px;
        line-height: 16px;
        margin-bottom: 16px;
    }
    /*会议纪要*/
    .modal-div:deep(.ant3-empty) {
        height: 20px; /* 设置你想要的高度 */
        margin: 0;
    }
    .modal-div:deep(.ant3-empty-image) {
        display: none;
    }
    .modal-div:deep(.ant3-empty-description) {
    }
    :deep(.ql-editor) {
        min-height: 110px;
        background: #ffffff;
    }
    .meeting-div :deep(.ant3-form-item-label) {
        width: 130px;
    }
    .gd-form-content :deep(.ant3-form-item-label) {
        width: 135px;
    }
    .gd-form-content :deep(.ant3-input-number),
    :deep(.ant3-picker) {
        width: 100%;
    }
    .gd-form-content :deep(.ql-snow .ql-editor) img {
        width: 200px;
    }
    .btn-div {
        width: 100%;
        padding: 16px 0;
        display: flex;
        justify-content: end;
        position: absolute;
        right: 24px;
        bottom: 0;
        background-color: #fff;
        z-index: 10000;
    }
    .status-div {
        color: #fff;
        width: 60%;
        margin: 0 auto;
        border-radius: 4px;
    }
    .reset-btn {
        //background: #eeeeee;
        border-radius: 4px;
        //border-color: #eeeeee;
        //color: #262626;
        display: flex;
        align-items: center;
    }
    .reset-btn:hover {
        background: #3875ff;
        border-color: #d9d9d9;
        color: #fff;
    }
    /*转任务*/
    .mbtask-form :deep(.ant3-form-item-label) {
        width: 115px !important;
    }
    /*转任务*/
    .import-btn:hover {
        background: #3875ff;
        border-color: #d9d9d9;
        color: #fff;
    }
    .btn-bc {
        background: rgba(56, 117, 255, 0.1);
        border: 1px solid #3875ff;
        color: #3875ff;
    }
    .btn-bc:hover {
        background-color: #3875ff;
        color: #fff;
    }
    .add-way-mannal,
    .add-way-llm {
        position: relative;
        width: 66px;
        height: 28px;
        background-size: cover;
    }
    .add-way-mannal {
        background-image: url('http://10.40.0.33:9001/file-storage/514170719335090176-source.png');
    }
    .add-way-llm {
        background-image: url('http://10.40.0.33:9001/file-storage/514169663402280960-source.png');
        cursor: pointer;
    }
    .add-way-llm:hover {
        background-image: url('http://10.40.0.33:9001/file-storage/514174957335349248-source.png');
    }
    .add-way-llm:hover .add-text-llm {
        top: 5px;
    }
    .add-text-mannal,
    .add-text-llm {
        position: absolute;
        right: 8px;
        top: 4px;
        font-size: 14px;
        color: #262626;
        letter-spacing: 0;
        text-align: center;
        font-weight: 600;
    }
    .add-text-llm {
        color: #d70010;
    }

    .btn-father {
        padding: 0;
    }
    .btn-content {
        position: relative;
    }
    .son-line {
        position: absolute;
        width: 1px;
        height: 14px;
        background-color: #3875ff;
        right: -9px;
        top: 50%;
        transform: translateY(-50%);
    }
    .mg16 {
        margin-bottom: 16px;
    }
    .mg8 {
        margin-bottom: 8px;
    }
    .diff-title {
        font-size: 16px;
        color: #262626;
        letter-spacing: 0;
        font-weight: 600;
        line-height: 16px;
        padding-left: 8px;
        border-left: 4px solid #3875ff;
        height: 16px;
    }
    .row-new {
        display: flex;
        gap: 16px;
        align-items: stretch; /* ⭐ 关键，让左右 box 自动等高 */
        margin-bottom: 16px;
    }

    .row-new .col-item {
        flex: 1;
        display: flex;
        gap: 24px;
    }

    .row-new .title {
        width: 80px;
        flex-shrink: 0;
        white-space: nowrap;
        padding-top: 5px;
    }

    .row-new .box {
        flex: 1;
        word-break: break-word;
        white-space: pre-wrap;
        border: 1px solid #d9d9d9;
        border-radius: 2px;
        padding: 5px 10px;
        min-height: 32px;
        background-color: #fff;
    }
    .slide-fade-enter-active,
    .slide-fade-leave-active {
        transition: all 0.3s ease;
        overflow: hidden;
    }
    .slide-fade-enter-from,
    .slide-fade-leave-to {
        max-height: 0;
        opacity: 0;
    }
    .slide-fade-enter-to,
    .slide-fade-leave-from {
        max-height: 500px; /* 根据内容大小调整 */
        opacity: 1;
    }
    .table-box-task:deep(
            .ant3-table.ant3-table-bordered > .ant3-table-container > .ant3-table-content > table > tbody > tr > td
        ) {
        padding: 8px 16px;
    }
    .table-box-story:deep(
            .ant3-table.ant3-table-bordered.ant3-table-small
                > .ant3-table-container
                > .ant3-table-body
                > table
                > tbody
                > tr
                > td
                > .ant3-table-expanded-row-fixed
        ) {
        padding-left: 22px !important;
        padding-bottom: 5px !important;
    }
    .table-box-story:deep(.ant3-table-expanded-row-fixed) {
        padding: 0;
    }
    .expend-btn {
        position: absolute;
        top: 10px;
        left: 10px; /* 往左偏移 */
        z-index: 20; /* 高于表格单元格 */
        cursor: pointer;
    }
    .table-box-story {
        position: relative;
    }
    .table-box-task:deep(.ant3-table) {
        margin-left: 38px !important;
    }
</style>
